You may call this function to convert an image window owned by your application into a GUI window (bAssociate = TRUE), or to render a GUI window that is no longer a GUI window (bAssociate = FALSE).
Declaration:
|
Copy Code
|
AT_ERRCOUNT ACCUAPI IG_GUI_window_associate (
HIGEAR hIGear,
DWORD dwGrpID,
HWND hWndImage,
BOOL bAssociate
);
|
Arguments:
Name |
Type |
Description |
hIGear |
HIGEAR |
The HIGEAR handle of an image. |
dwGrpID |
DWORD |
The display group identifier indicating where to obtain the display options for drawing an image in the GUI window. |
hWndImage |
HWND |
The HWND handle of the image window. |
bAssociate |
BOOL |
TRUE = associate; FALSE = disassociate. |
Return Value:
Returns the number of ImageGear errors that occurred during this function call.
Supported Raster Image Formats:
All pixel formats supported by ImageGear for C and C++.
Sample:
Display, GUI Windows
Example:
|
Copy Code
|
HIGEAR hIGear; /* HIGEAR handle of image */
HWND hWnd; /* Window it is being displayed in */
/* Turn existing window into a GUI window: */
IG_GUI_window_associate ( hIGear, hWnd, TRUE );
|
Remarks:
In general, the parent window of a magnify or pan window should be made a GUI window so that ImageGear will automatically handle the magnifying or panning function.
In any case, if a window had not been made a GUI window by calling IG_GUI_window_associate() or IG_GUI_window_create(), then your application will have to handle the Windows message such as WM_PAINT, and the WM_... scroll messages generated in response to user mouse clicks.
See also function
IG_GUI_window_create(), which creates a GUI window, rather than associating an already existing window.