This function is called to create a GUI window.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_GUI_window_create (
HIGEAR hIGear,
DWORD dwGrpID,
HWND hWndParent,
const LPSTR lpszTitle,
INT nX,
INT nY,
INT nWidth,
INT nHeight,
HWND FAR* lphWndImage
);
|
Name | Type | Description |
---|---|---|
hIGear | HIGEAR | HIGEAR handle of an image. |
dwGrpId | DWORD | Display group identifier, which is used to display an image in the GUI window. |
hWndParent | HWND | Handle of the Parent window. |
lpszTitle | const LPSTR | Title of an Image Window. |
nX | INT | X position of the Image window's upper left corner. |
nY | INT | Y position of the Image window's upper left corner. |
nWidth | INT | Width of the Image window. |
nHeight | INT | Height of the Image window. |
lphWndImage | HWND FAR* | Far pointer to the HWND object to hold the Image window handle. |
Returns the number of ImageGear errors that occurred during this function call.
All pixel formats supported by ImageGear for C and C++.
GUI Windows, Display
Copy Code
|
|
---|---|
LPFNIG_GUIWINDESTROY MyGUIwinCleanup; /* Called when GUI window closed */ HWND hWnd; /* Handle of existing parent window */ HWND hWndImage; /* Will hold handle of GUI window */ BOOL bDelete; /* TRUE= delete HIGEAR image when close window */ AT_ERRCOUNT nErrcount; /* Returned count of errors */ /* Create a GUI image window: */ nErrcount = IG_GUI_window_create ( hIGear, IG_GRP_DEFAULT, hWnd, "My GUI Image Window", 100, 50, 400, 200, &hWndImage ); If ( nErrcount == 0) { /* Register a function to be called if user closes this GUI window: */ bDelete = FALSE; /* (Don't delete HIGEAR if window is closed)*/ IG_GUI_window_CB_register ( hWndImage, MyGUIwinCleanup, (LPVOID) &bDelete ); ... } /* Callback function, called when window is destroyed: */ VOID ACCUAPI MyGUIwinCleanup ( LPVOID lpPrivate, HIGEAR hIGear, HWND hWndClosing ) { /* Delete the image if bDelete not FALSE: */ if ( *((LPBOOL) lpPrivate) ) { if ( IG_image_is_valid (hIGear) ) { IG_image_delete ( hIGear ); } } return; } |
See the description of the IG_GUI_window_associate() function.