This function can be called while processing the Windows mouse-button-down message WM_LBUTTONDOWN, for a magnify window's parent window.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI IG_GUI_magnify_track_mouse ( HIGEAR hIGear, DWORD dwGrpID, HWND hWndMagnify, INT nX, INT nY ); |
Arguments:
hIGear | HIGEAR handle of image. |
DwGrpID | Identifier of group which is used for drawing the image in the parent window. |
HwndMagnify | Handle of GUI Magnify window. |
nX | X position of left mouse button click. |
nY | Y position of left mouse button click. |
Return Value:
Returns the number of ImageGear errors that occurred during this function call.
Supported Raster Image Formats:
All pixel formats supported by ImageGear Professional.
Sample:
Magnify, Display, GUI Windows
Example:
Copy Code | |
---|---|
HIGEAR hIGear; /* Global handle of image in parent window */ HWND hWndParent; /* Global Windows handle of that window */ HWND hWndMagnify; /* Global HIGEAR handle of Magnify window */ AT_ERRCOUNT nErrcount; /* Returned count of errors */ ... /* Create a Magnify window for the image in window hWndParent: */ nErrcount = IG_GUI_magnify_window_create ( hIGear, IG_GRP_DEFAULT, hWndParent, "I.G. Mag Window", 50, 50, 200, 200, &hWndMagnify ); ... /* Message-Handling routine: */ LPARAM CALLBACK MsgHandler (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ); { ... switch (msg) { case WM_LBUTTONDOWN: /* if occurred in the Magnify window: */ IG_GUI_magnify_track_mouse ( hIGear, IG_GRP_DEFAULT, hWndMagnify, LOWORD(lParam), HIWORD(lParam) ); /* The above will display magnified, the location where the mouse was just clicked in the parent image window. */ ... } ... } /* See also sample application MAGNIFY. */ |
Remarks:
This function will show, magnified in the magnify window, the portion of the image that is at the location of the mouse click in the parent window.
See the function IG_GUI_magnify_window_create(). |
You can obtain the coordinates (nX, nY) of the mouse click, from the parameters passed by Windows with the WM_... message. See the sample application MAGNIFY for a description of how to use this and related IG_GUI_magnify_...() functions.
You cannot use IG_GUI_..._track_mouse() with a WM_RBUTTONDOWN message. ImageGear only responds to left mouse button clicks. |