L_ConvertFromDDB
#include "l_bitmap.h"
L_LTDIS_API L_INT L_ConvertFromDDB(hDC, pBitmap, uStructSize, hBitmap, hPalette)
L_HDC hDC; |
/* handle to the device responsible for the conversion */ |
pBITMAPHANDLE pBitmap; |
/* pointer to the target bitmap handle */ |
L_UINT uStructSize; |
/* size in bytes, of the structure pointed to by pBitmap */ |
L_HBITMAP hBitmap; |
/* handle to the DDB to be converted */ |
L_HPALETTE hPalette; |
/* handle to the palette */ |
Converts a Windows device dependent bitmap (DDB) into a LEAD Technologies bitmap. When this function is completed, there are two copies of the image in memory: the original DDB and the LEAD bitmap. Freeing one will not affect the other.
Parameter |
Description |
hDC |
Handle to the device responsible for the conversion. The mapping mode of the device context must be MM_TEXT. |
pBitmap |
Pointer to the bitmap handle referencing the target LEAD bitmap. |
uStructSize |
Size in bytes, of the structure pointed to by pBitmap, for versioning. Use sizeof(BITMAPHANDLE). |
hBitmap |
Handle to the DDB to be converted. |
hPalette |
Handle to the palette. This value can be NULL if the hDC parameter refers to a device that is greater than 8 bits, or if the bitmap will use the system palette. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
This function updates information in the bitmap handle and copies the DDB image data into the LEAD bitmap.
Before calling this function, you must declare the LEAD bitmap handle and initialize it, specifying a height and width of 0. However, you should not allocate the bitmap. (If the bitmap is already allocated, you must free it and initialize the bitmap handle again.)
Required DLLs and Libraries
LTDIS For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Platforms
Windows 2000 / XP/Vista, Windows CE.
See Also
Functions: |
|
|
|
|
|
|
|
Topics: |
|
|
Example
For a short example, refer to L_ConvertToDDB. For complete sample code, refer to the DIBDDB example.