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

This function allows you to change various settings for the GUI Thumbnail Browser.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_GUI_thumbnail_attribute_set (
        HWND hwndThumbnail,
        AT_MODE nAttributeID, 
        const LPVOID lpData
);

Arguments:

Name Type Description
hwndThumbnail HWND Windows handle to the Thumbnail Window.
nAttributeID AT_MODE An integer variable of type AT_MODE that tells the attribute for which to get the current setting. These constants all have the prefix IG_GUI_THUMBNAIL_ and are defined in accucnst.h.
lpData const LPVOID The new setting for the thumbnail attribute referred to by nAttributeID.

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:

Thumbnail, FlashPix

Example:

 
Copy Code
UINT      nThumbWidth = 64;      /* thumbnail width */
UINT    nThumbHeight = 64;     /* thumbnail height  */
/*Set the width and height for the thumbnails in the browse  */
IG_GUI_thumbnail_attribute_set(hwndThumb,
IG_GUI_THUMBNAIL_WIDTH,(LPVOID)(DWORD)nThumbWidth);
IG_GUI_thumbnail_attribute_set(hwndThumb, IG_GUI_THUMBNAIL_HEIGHT,
(LPVOID)(DWORD)nThumbHeight);
The thumbnail sample contains a comprehensive dialog box for changing GUI Thumbnail browser display attributes.

Remarks:

Set nAttributeID to the appropriate defined IG_GUI_THUMBNAIL_ constant and lpData to the appropriate value. The table below lists the GUI Thumbnail Settings and indicates to what the various attributes refer.

If the type of lpData is less than 32 bits, the value is passed. If the type is greater than 32 bits, the address is passed.

Image Control Constants Type Values Range
IG_GUI_THUMBNAIL_WIDTH INT Width of thumbnail.
IG_GUI_THUMBNAIL_HEIGHT INT Height of thumbnail.
IG_GUI_THUMBNAIL_SHOW_TITLE BOOL TRUE - title will be shown; FALSE - title will not be shown.
IG_GUI_THUMBNAIL_X_SPACING INT X offset of upper left corner of thumbnail.
IG_GUI_THUMBNAIL_Y_SPACING INT Y offset of upper left corner of thumbnail from the edge or the previous thumbnail.
IG_GUI_THUMBNAIL_SHOW_FLAT BOOL TRUE - no 3-D display; FALSE - 3-D display.
IG_GUI_THUMBNAIL_BORDER_WIDTH INT Width of the border surrounding the thumbnail in pixels.
IG_GUI_THUMBNAIL_SHADOW_WIDTH INT Width of the shadow surrounding the thumbnail in pixels.
IG_GUI_THUMBNAIL_ZOOM_FACTOR INT Zoom factor is applied to the thumbnail when shift and the left mouse button are selected.
IG_GUI_THUMBNAIL_INTERIOR INT Thumbnail interior border spacing in pixels.
IG_GUI_THUMBNAIL_MAGNIFY_FLAG BOOL TRUE - if thumbnail is selected image will magnify; FALSE - no magnification occurs.
IG_GUI_THUMBNAIL_TITLE_HEIGHT INT Height of the thumbnail title.
IG_GUI_THUMBNAIL_USE_EMBEDDED BOOL TRUE - all embedded thumbnails will be used to display thumbnail; FALSE - create a thumbnail from the image.
IG_GUI_THUMBNAIL_ACTIVE_ID INT An index of the currently selected icon in the thumbnail window.
IG_GUI_THUMBNAIL_ MULTISELECT BOOL TRUE allows you to select multiple thumbnails.
IG_GUI_THUMBNAIL_HIGHLIGHT_ COLOR AT_RGBQUAD The color for highlighted icons that have the same filename.
IG_GUI_THUMBNAIL_ALL_PAGES BOOL TRUE - if image is a multi-page image, there will be a thumbnail for each page; FALSE - only first page will be displayed as a thumbnail.

In this diagram, IG_GUI_THUMBNAIL_SHOW_FLAT is set to FALSE.

If you set IG_GUI_THUMBNAIL_ZOOM_FACTOR to > 1, the image is zoomed when you shift-click on the thumbnail. Here is an example:

The center thumbnail has been clicked and zoomed.