ZeeImage Control Message

ZIM_GETIMAGEWIDTH


ZIM_GETIMAGEWIDTH

An application sends a ZIM_GETIMAGEWIDTH to retrieve the width dimension of the specified image in the ZeeImage image list. The image will be autosized (shrunk) to fit in the client area of the ZeeImage control. This message will return the actual dimensions of the image before any resizing is done by the control to display it.

ZGM_GETIMAGEWIDTH
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. Not used. Set to 0.

Return Values

This message returns the width of the image in pixels, as it was loaded into the ZeeImage control before being displayed.

Example


int image_width;
image_width = SendMessage(himage,ZIM_GETIMAGEWIDTH,1,0);

Note:

If you are only letting the images be displayed in the ZeeImage control, you will not need this message. However, if you are displaying the images outside the the control, you will need to use ZIM_GETIMAGEWIDTH and ZIM_GETIMAGEHEIGHT to calculate a proper display rectangle to BitBlt() it.

Copyright © 2020 by David Hillard