ZeeImage Control Message

ZIM_GETBITMAP


ZIM_GETBITMAP

An application sends a ZIM_GETBITMAP to the ZeeImage control to get a handle to the HBITMAP of the image in a specified slot or index of the control.

ZIM_GETBITMAP
wParam = (WPARAM)(int) iSlot;           //slot or index of the image control
lParam = 0;                             //Not used. Set to 0.

Parameters

iSlot
The value of wParam. The index of the image list to load the image into.

lParam
The value of lParam. lParam is not used and should be set to 0.

Return Values

This message returns a handle to the HBITMAP of the image contained in the specified slot. It will return NULL if the slot does not contain an image.

Example


HBITMAP bm;
bm=(HBITMAP)SendMessage(himage,ZIM_GETBITMAP,5,0);
//HBITMAP bm now holds a handle to the bitmap of the image in slot 5 of the ZeeImage control.
//HBITMAP bm is now ready to be used by your application by selecting it into a device context.
//with SelectObject().  Don't forget to select it out of the device context when finished with it.
//Do not execute a DeleteObject() on it.  The ZeeImage control "owns" the HBITMAP of the image.

Note:

The bitmap is not copied. You are really getting a handle to the actual HBITMAP.

Copyright © 2020 by David Hillard