LEADTOOLS Raster Imaging C DLL Help > Function References > L_AnnClipboardReady |
#include "l_bitmap.h"
L_LTANN_API L_INT L_AnnClipboardReady(pfReady)
L_BOOL * pfReady; |
/* address of the variable to be updated */ |
Determines whether the Windows clipboard contains an annotation object that can be pasted using the L_AnnCopyFromClipboard function.
Parameter |
Description |
|
pfReady |
Address of the variable to be updated with a value indicating whether the clipboard contains an annotation object. Possible values are: |
|
|
Value |
Meaning |
|
TRUE |
The clipboard contains an annotation that can be copied. |
|
FALSE |
The clipboard does not contain an annotation that can be copied. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
(Document and Medical) Before calling this function, you must declare a variable of data type L_BOOL. Then, pass the address of the variable in the pfReady parameter. This function will update the variable with the result of the test.
You can use L_AnnCopyToClipboard or L_AnnCutToClipboard to put valid annotation data on the clipboard. L_AnnCopyFromClipboard can be used to copy valid annotation data from the clipboard to a container.
For more information about loading and pasting automated annotations, refer to Loading and Pasting Automated Annotations.
Required DLLs and Libraries
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
See Also
Functions: |
|
|
|
Topics: |
|
|
|
|
|
|
|
|
Example
For complete sample code, refer to the ANNOTATE example. This example checks the clipboard for valid annotation data, and if valid data is present, copies and inserts the annotations, and displays the results.
L_INT AnnClipboardReadyExample(HWND hWnd, HANNOBJECT hContainer)/* Container annotation object */ { L_INT nRet; L_BOOL GoodData; /* TRUE if there is annotation data on the clipboard */ HDC hdc; RECT rAnnBounds; RECT rcAnnNameBounds; HANNOBJECT TmpContainer; /* See if we have annotations on the clipboard */ nRet = L_AnnClipboardReady(&GoodData); if(nRet != SUCCESS) return nRet; /* Copy the annotations, if they exist */ if (GoodData) { nRet = L_AnnCopyFromClipboard(hWnd, &TmpContainer); if(nRet != SUCCESS) return nRet; /* The following code inserts the copied annotations and allows you to see the results. */ nRet = L_AnnInsert(hContainer, TmpContainer, TRUE); if(nRet != SUCCESS) return nRet; hdc = GetDC(hWnd); nRet = L_AnnGetBoundingRect(hContainer, &rAnnBounds, &rcAnnNameBounds); if(nRet != SUCCESS) return nRet; nRet = L_AnnDraw(hdc, &rAnnBounds, hContainer); if(nRet != SUCCESS) return nRet; } return SUCCESS; }