L_LTDIS_API L_BOOL L_CopyFromClipboard(hWnd, pBitmap, uStructSize)
Copies image data from the clipboard to a specified bitmap. The image on the clipboard must be a DIB, DDB, or aWMF.
Handle to the active window.
Pointer to the bitmap handle referencing the bitmap to fill. This function will allocate the storage to hold the image.
Size in bytes, of the structure pointed to by
pBitmap, for versioning. Use sizeof(BITMAPHANDLE).
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
The LEAD bitmap is referenced by the pointer to the bitmap handle. The bitmap will contain the same width, height, and bits per pixel as the image contained in the clipboard. The color order field in the bitmap handle will be set to ORDER_BGR. If the copied image is not in BGR order, it is up to you to change its color order using L_ColorResBitmap.
The destination bitmap must not be allocated before this function is called. If the bitmap is already allocated, you must free it and initialize the bitmap handle.
To determine whether a region was pasted, you must call L_BitmapHasRgn(pBitmap).
Required DLLs and Libraries
For complete sample code, refer to the FRAME.C module of the DEMO
This example loads a bitmap using clipboard data, if available.
L_BOOL CopyFromClipboardExample(L_HWND hWnd,pBITMAPHANDLE pLeadBitmap,L_INT *pRet)
if (L_ClipboardReady ())
/* Copy the bitmap from the clipboard */
*pRet = L_CopyFromClipboard(hWnd, pLeadBitmap, sizeof(BITMAPHANDLE));
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries