ImageGear for C and C++ on Windows v19.9 - Updated
IG_GUI_page_window_create
API Reference Guide > Core Component API Reference > Core Component Functions Reference > GUI Functions > GUI Page Functions > IG_GUI_page_window_create

Please use the new upgraded function IG_GUI_page_window_create_ex().

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_GUI_page_window_create (
        HWND hwndParent, 
        DWORD dwGrpID, 
        const LPSTR lpcszTitle, 
        INT x, 
        INT y, 
        INT nPageWidth, 
        INT nPageHeight, 
        HWND FAR* lphwndPage
);

Arguments:

Name Type Description
hWndParent HWND Windows handle to the parent window.
dwGrpID DWORD Identifier of the display group that should be used for drawing thumbnail in the GUI page.
lpcszTitle const LPSTR A long pointer to a string that sets the title for the window.
x INT A variable of type INT that sets the x position of the window.
y INT A variable of type INT that sets the y position of the window.
nPageWidth INT A variable of type INT that sets the width of the window.
nPageHeight INT A variable of type INT that sets the height of the window.
lphwndPage HWND FAR* A long pointer that returns the window handle of the page sorter.

Return Value:

Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.

Supported Raster Image Formats:

This function does not process image pixels.

Sample:

Page

Example:

 
Copy Code
HIGEAR hIGear, hIGearSave; /* HIGEAR handles of images */
AT_ERRCOUNT  nErrcount;      /* Tally of ImageGear errors */
INT xpos, ypos,    /* Position of parent window  */
                nPageCount;     /* # of pages in page sorter */
HWND hwndPage;    /* Windows handle to a page  */
nErrCount = IG_GUI_page_window_create(hWnd, IG_GRP_DEFAULT, "Page Window", xpos, ypos,
320, 200, &hwndPage);
 ...
/* save the pages in the sorter window to a multi-page file */
IG_GUI_page_count_get(hwndPage, &nPageCount);
for (i = 1; i <= nPageCount; i++)
{
   IG_GUI_page_handle_get(hwndPage, i, &hIGearSave);
   nErrCount = IG_save_file(hIGearSave, "NewPages.tif",IG_SAVE_FORMAT_TIF_RLE);
   if (nErrCount != 0)
   {
   /* report the error */
   ErrorReport(hWnd);
   break;
   }
}

Remarks:

The functionality of this API call has been upgraded and supported by the new function IG_GUI_page_window_create_ex(). The reason that this new function has been created is that the old function does not allow you to set the Windows Style bits. In the interest of backward compatibility, we have left the old function in its original form and have retained support for it. If you have already used the old function in your code, it is not mandatory that you modify your code, but it is recommended.

This function creates a page sorter window. The purpose of the page sorter window is for creating a new multi-page file or to edit an existing one. When you're done editing pages, you have the option to save out a single image file with multiple pages.

For a screen capture of a GUI page sorter, see IG_GUI_page_window_create().

This function takes as parameters settings for the size and position of the page sorter, and returns the handle of the new page sorter window. If there is no parent window, set hWndParent to NULL. The page sorter window will show small versions (thumbnails) of any file that is added to the page sorter window by the function IG_GUI_page_file_append().

See also IG_GUI_page_update(), IG_GUI_page_document_update(), and IG_GUI_page_window_create_ex() functions.