ImageGear Professional DLL v18.1 for Windows
IG_GUI_page_insert
Send Feedback
ImageGear Professional v18.1 > API Reference Guide > Core Component API Reference > Core Component Functions Reference > GUI Functions > GUI Page Functions > IG_GUI_page_insert

Glossary Item Box

This function inserts a new image into the GUI Page Sorter window referenced by hwndPage.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_GUI_page_insert(
        HWND hwndPage, 
        HIGEAR hIGear, 
        UINT nPage
);

Arguments:

Name Type Description
HwndPage HWND Windows handle to the Page Sorter window.
hIGear HIGEAR The HIGEAR handle of the image you would like to insert into the GUI Page Sorter window.
nPage UINT Set this to the page number you would like to assign to the new HIGEAR image that you are adding to the GUI Page Sorter Window.

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:

All pixel formats supported by ImageGear Professional.

Sample:

None

Example:

  Copy Code
HIGEAR hIGear;    /* HIGEAR handle of image */
AT_ERRCOUNT  nErrcount;  /* Tally of IG errors on the stack */
HWND  hwndPage;  /* Windows handle to GUI Page Sorter */
UINT nPage;    /* Page number to assign to new image */
nErrcount = IG_load_file("kittens.bmp", &hIGear);
/* Insert "kittens.bmp" as first image in GUI Page Sorter  */
AT_ERRCOUNT ACCUAPI IG_GUI_page_insert(hwndPage, hIGear, 1);

Remarks:

Set nPage to the page number that you would like ImageGear to assign to your newly inserted image. For example, if there are several images already in the GUI Page Sorter window, and you ask to insert the new image as page 3 (nPage = 3), the old page 3 becomes page 4, and the old page 4 becomes page 5, etc. The HIGEAR handles of the loaded images never change despite any changes in page numbers; all images retain their original HIGEAR handle values.

If you set nPage to a page number greater than the number of images in the GUI Page Sorter, the image will be appended. In other words, ImageGear will set its page number to the total number of pages + 1.

To delete an image (thumbnail) from the GUI Page Sorter window, use IG_GUI_page_remove().

©2014. Accusoft Corporation. All Rights Reserved.