MImgCreateHBITMAP
hBitmap = MImgCreateHBITMAP( hImage, hDC )
Creates a compatible or device independent HBITMAP from an image.
Parameters
hImage
Number: Handle of the image
hDC
Number: Device context. If you pass 0, a device independent bitmap is created, otherwise a compatible bitmap is created
Return
Number: Handle of the bitmap if successful or 0 if an error occurs
Example
In this example a compatible bitmap is created and displayed in a picture:
Set hDC = GetDC( hWndNULL )
Set hBitmap = MImgCreateHBITMAP( hImage, hDC )
ReleaseDC( hWndNULL, hDC )
Call SalPicSetHandle( pic1, PIC_FormatBitmap, hBitmap )
Remarks
Don't forget to delete the created bitmap with DeleteObject.
See also
MImgCreateCopy
MImgCreateCopyEx
MImgCreateHICON
MImgCreateVisPic
Created with the Personal Edition of HelpNDoc: Free help authoring tool