ImageGear for C and C++ on Windows v19.1 - Updated
IG_GUI_thumbnail_sort
API Reference Guide > Core Component API Reference > Core Component Functions Reference > GUI Functions > GUI Thumbnail Functions > IG_GUI_thumbnail_sort

Call this function to register a callback function that is to be called to sort the thumbnails in the window hWndThumbnail.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_GUI_thumbnail_sort (
        HWND hWndThumbnail, 
        LPFNIG_GUITHUMBCOMP lpfnThumbCompare,
        LPVOID lpPrivate 
);

Arguments:

Name Type Description
hWndThumbnail HWND Handle of Thumbnail window.
lpfnThumbCompare LPFNIG_GUITHUMBCOMP Far pointer to callback function to be called to compare thumbnails for a sort.
lpPrivate LPVOID Far pointer to private data to be passed to the callback function.

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++.

The callback used with this function correctly reports color space and bit depth for these pixel formats only:

Indexed RGB – 1, 4, 8 bpp;
Grayscale – 9…16 bpp;
RGB – 24 bpp;
CMYK – 32 bpp

Sample:

Thumbnail

Example:

For an example showing the use of this and other IG_GUI_Thumbnail functions and callbacks, see sample application THUMB.

Remarks:

See also the description for the callback type LPFNIG_GUITHUMBCOMP. It is your callback function that performs the actual sorting.

See also IG_GUI_thumbnail_attribute_set() function.