ImageGear Professional DLL v17.1 for Windows Accusoft
IG_GUI_window_create
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > Core Component API Reference > Core Component Functions Reference > GUI Functions > GUI Window Functions > IG_GUI_window_create

Glossary Item Box

This function is called to create a GUI window.

Declaration:

  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 
);

Arguments:

hIGear HIGEAR handle of an image.
dwGrpId Display group identifier, which is used to display an image in the GUI window.
hWndParent Handle of the Parent window.
lpszTitle Title of an Image Window.
nX X position of the Image window's upper left corner.
nY Y position of the Image window's upper left corner.
nWidth Width of the Image window.
nHeight Height of the Image window.
lphWndImage Far pointer to the HWND object to hold the Image window handle.

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:

GUI Windows, Display

Example:

  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;
}

Remarks:

See the description of the IG_GUI_window_associate() function.

 Currently it is possible to change font title for Page windows that is created by IG_GUI_page_window_create(). To set the font use IG_GUI_page_attribute_set() and to get the font use IG_GUI_page_attribute_get() with IG_GUI_PAGE_FONT_TITLE option. As in the case of thumbnail window, the user is responsible for creating and deleting font.
©2012. Accusoft Corporation. All Rights Reserved.