Admin Production ni-theme
Current Publication

ClipboardGetBitmap

LabWindows/CVI

ClipboardGetBitmap

int ClipboardGetBitmap (int *bitmapID, int *available);

Purpose

Determines whether or not a bitmap image is available on the system clipboard and optionally retrieves a copy of the bitmap. You can pass the ID of the bitmap to any function that accepts a bitmap, such as CanvasDrawBitmap.

(Linux) This function accesses only the internal LabWindows/CVI clipboard, not the host system clipboard.

Regardless of the original color depth of bitmap on the clipboard, the bitmap that ClipboardGetBitmap creates matches the color depth of the display screen.

Parameters

Output
Name Type Description
bitmapID int ID that serves as a handle to the bitmap copied from the clipboard.

You can pass the ID to functions that accept a bitmap, such as CanvasDrawBitmap and ClipboardPutBitmap.

When you no longer need the bitmap, free it by passing the ID to DiscardBitmap.

If there is no bitmap on the clipboard, bitmapID is set to NULL. If you want to check whether a bitmap is on the clipboard but do not want to retrieve it, pass 0 for this parameter.

Zero is not a valid bitmap ID.
available int Indicates whether a bitmap image is available on the system clipboard.

This parameter is set to 1 if a bitmap is available on the system clipboard, 0 otherwise.

You can pass NULL for this parameter.

Return Value

Name Type Description
status int Return value indicating whether the function was successful. A negative number indicates that an error occurred.

Additional Information

Library: User Interface Library

Include file: userint.h

LabWindows/CVI compatibility: LabWindows/CVI 4.0 and later

Examples

Refer to the following examples that use the ClipboardGetBitmap function:

  • apps\iconedit\iconedit.cws

    Open example
  • userint\clipbord.cws

    Open example