ID_VWM enum

View window message flags

Syntax

#define ID_VWM_SETSOURCE (WM_USER+5)
#define ID_VWM_CALCMAGNIFICATION (WM_USER+2)
#define ID_VWM_SETMAGNIFICATION (WM_USER+3)
#define ID_VWM_GETMAGNIFICATION (WM_USER+4)

Constants

Value Meaning

ID_VWM_SETSOURCE

(required) Specifies the image to be displayed.

wReserved = (WPARAM)wParam // Reserved - set to 0

lpszFileName = (LPCSTR)lParam // File containing image to display

Returns: IDP status code.

Note: the lpszFileName buffer is temporary and must not be used after this message has been processed.

ID_VWM_CALCMAGNIFICATION

(required) Calculates the highest magnification level that can be fully displayed within the given window dimensions.

siSize = (SIZE*)wParam // Pointer to a SIZE structure that specifies the window dimensions.

siMag = (SIZE*)lParam // Pointer to a SIZE structure that receives the magnification level, where cx is set to the numerator, and cy is set to the denominator.

Returns: 1 on success, 0 on error.

ID_VWM_SETMAGNIFICATION

(required) Specifies the magnification (zoom level) at which the image should be displayed.

The magnification level is represented as a fractional number, where 1/1 represents 100% magnification.

wReserved = (WPARAM)wParam // Reserved - set to 0

siMag = (SIZE*)lParam // Pointer to a SIZE structure that specifies the magnification level, where cx is set to the numerator, and cy is set to the denominator.

Returns: 1 if magnification was set, 0 on error.

Note: If the resulting display size of the image exceeds the window dimensions, then the view should be scrollable, either through the addition of scroll bars, or allowing the user to click and drag the image.

ID_VWM_GETMAGNIFICATION

(required) Retrieves the current magnification (zoom level).

The magnification level is represented as a fractional number, where 1/1 represents 100% magnification.

pNumerator = (UINT*)wParam // Address of UINT that receives the numerator

pDenominator = (UINT)lParam // Address of UINT that receives the denominator.

Returns: 1 on success, 0 on error.

Remarks

These flags specify which messages can be sent to the plug-in's window.

Requirements

Header: ID_PlugIn.h