ImageGear for C and C++ on Windows v19.1 - Updated
LPFNIG_GUITHUMBCOMP
API Reference Guide > Core Component API Reference > Core Component Callback Functions Reference > LPFNIG_GUITHUMBCOMP

This function is called automatically for successive pairs of thumbnails in your thumbnail window, until all have been sorted.

Declaration:

 
Copy Code
typedef INT (ACCUAPI LPFNIG_GUITHUMBCOMP) (
        LPVOID lpPrivate, 
        HWND hWndThumbnail, 
        const LPSTR lpszFileName1, 
        const LPSTR lpszFileName2, 
        const LPAT_DIB lpDIB1, 
        const LPAT_DIB lpDIB2 
);

Arguments:

Name Type Description
lpPrivate LPVOID Far pointer to private data passed.
hWndThumbnail HWND Thumbnail window handle.
lpszFileName1 const LPSTR Far pointer to zero-terminated string; name of the first thumbnail file of two to be compared.
lpszFileName2 const LPSTR Far pointer to zero-terminated string; name of the second thumbnail file of two to be compared.
lpDIB1 const LPAT_DIB Far pointer to DIB of first thumbnail file.
lpDIB2 const LPAT_DIB Far pointer to DIB of second thumbnail file.

Return Value:

Return a value of -1, 0, or +1, to indicate the first thumbnail is to be before, equal, or after, the second thumbnail.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Sample:

Thumbnail

Example:

For an example of this and other IG_GUI_Thumbnail_ functions and callbacks, see sample application THUMB.

Remarks:

This type of callback function is registered during a call to IG_GUI_thumbnail_sort().

You are passed both the filename and the DIB pointer for each of the pair of thumbnails, and you may compare them in any way you wish. You return -1 to tell ImageGear that the first thumbnail (file and DIB1) should go "before" the other, or +1 to tell ImageGear that the first should go "after." Return 0 if either order is acceptable.