LBitmapBase::ConvertToDDB
#include "ltwrappr.h"
virtual HBITMAP LBitmapBase::ConvertToDDB(hDC)
HDC hDC; |
/* handle to the device responsible for the conversion */ |
Converts an LBitmapBase object�s bitmap into a Windows device dependent bitmap (DDB). When this function is completed, there are two copies of the image in memory: the DDB and the original 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. |
Returns
This function returns a handle to the DDB, or it returns a NULL if there is an error.
Comments
This function allocates a DDB bitmap and copies the LBitmapBase object�s bitmap to the DDB. When you no longer need the DIB, you can free it using the Windows DeleteObject function.
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. |
See Also
Elements: |
LBitmapBase::ConvertFromDIB, LBitmapBase::ConvertToDIB, LBitmapBase::ConvertFromDDB, Class Members |
Topics: |
|
|
Example
LBitmapBase MyBitmap,Bitmap2;
HDC hDC=GetDC(0);
HBITMAP hBitmap;
MyBitmap.Load(TEXT("image1.cmp"));
hBitmap=MyBitmap.ConvertToDDB(hDC);
Bitmap2.ConvertFromDDB(hDC, hBitmap, 0);
ReleaseDC(0,hDC);