SftTabs/DLL 6.0

SFTTABS_GRAPH

Softel vdm, Inc.

Describes a tab's picture component and its location.

typedef struct tagSftTabsGraph {
    WORD location;
    WORD type;
    union tagSftTabsItem {
        HICON hIcon;
        HBITMAP hBitmap;
        struct tagSftTabsImage {
            short iImage;
            short iImageDisabled;
        } Image;
    } item;
} SFTTABS_GRAPH, * LPSFTTABS_GRAPH;

Members

location

Describes the location of the bitmap, relative to the tab text. The following values can be used:

SFTTABS_GRAPH_NONE

No bitmap or icon, text is centered horizontally and vertically.

SFTTABS_LEFTVALIGN

No bitmap or icon, text is left aligned. Use this option for tab controls with a vertical orientation to line up the tab text on the left side. The text is centered vertically.

SFTTABS_RIGHTVALIGN

No bitmap or icon, text is right aligned. Use this option for tab controls with a vertical orientation to line up the tab text on the right side. The text is centered vertically.

SFTTABS_GRAPH_LEFTVALIGN

Bitmap or icon, tab picture is left aligned, followed by the tab text. Use this option for tab controls with a vertical orientation to line up the tab picture on the left side. The text and picture are centered vertically.

SFTTABS_GRAPH_RIGHTVALIGN

Bitmap or icon, tab picture is right aligned. The tab text is located to the left of the tab picture. Use this option for tab controls with a vertical orientation to line up the tab picture on the right side. The text and picture are centered vertically.

SFTTABS_GRAPH_TOP

Bitmap or icon, tab picture is above the tab text. The text and picture are centered horizontally.

SFTTABS_GRAPH_BOTTOM

Bitmap or icon, tab picture is below the tab text. The text and picture are centered horizontally.

SFTTABS_GRAPH_LEFT

Bitmap or icon, tab picture is on the left of the tab text. The text and picture are centered horizontally and vertically.

SFTTABS_GRAPH_RIGHT

Bitmap or icon, tab picture is on the right of the tab text. The text and picture are centered horizontally and vertically.

If a rotated font is used, the orientation of the font's base line is used to determine the actual location of the bitmap or icon.

type

This member is provided for compatibility with versions prior to SftTabs/DLL 6.0. Instead, the SFTTABS_TAB, TabPicture member should be used to define the tab picture. If the TabPicture member defines a picture, the type member is ignored.

Describes the type of tab picture. The following values can be used:

0

No tab picture.

SFTTABS_GRAPH_ICON

Tab picture is an icon. The hIcon field of the item union contains a valid icon handle.

SFTTABS_GRAPH_BITMAP

Tab picture is a bitmap. The hBitmap field of the item union contains a valid bitmap handle.

SFTTABS_GRAPH_IMAGELIST

Tab picture is defined using an ImageList control. The iImage and iImageDisabled fields of the Image union contain the index of the image to be used.

hIcon

This member is provided for compatibility with versions prior to SftTabs/DLL 6.0. Instead, the SFTTABS_TAB, TabPicture member should be used to define the tab picture. If the TabPicture member defines a picture, the type member is ignored.

An icon handle, used as tab picture if type is defined as SFTTABS_GRAPH_ICON.

hBitmap

This member is provided for compatibility with versions prior to SftTabs/DLL 6.0. Instead, the SFTTABS_TAB, TabPicture member should be used to define the tab picture. If the TabPicture member defines a picture, the type member is ignored.

A bitmap handle, used as tab picture if type is defined as SFTTABS_GRAPH_BITMAP. The top, left pixel of the bitmap must contain the image's background color. This color will be replaced by the actual window background color when the bitmap is displayed.

iImage

This member is provided for compatibility with versions prior to SftTabs/DLL 6.0. Instead, the SFTTABS_TAB, TabPicture member should be used to define the tab picture. If the TabPicture member defines a picture, the type member is ignored.

The picture index used as tab picture if type is defined as SFTTABS_GRAPH_IMAGELIST. The picture is drawn transparently, based on the definition of the picture in the ImageList control. This iImage index is used only if the tab is enabled. If the tab is disabled, iImageDisabled is used instead. The picture index refers to the ImageList control defined using the SFTTABS_TAB structure. If hImageList in the SFTTABS_TAB structure is NULL, the default ImageList defined using the SFTTABS_CONTROL structure is used instead.

iImageDisabled

This member is provided for compatibility with versions prior to SftTabs/DLL 6.0. Instead, the SFTTABS_TAB, TabPicture member should be used to define the tab picture. If the TabPicture member defines a picture, the type member is ignored.

The picture index used as tab picture if type is defined as SFTTABS_GRAPH_IMAGELIST. The picture is drawn transparently, based on the definition of the picture in the ImageList control. This iImageDisabled index is used only if the tab is disabled. If the tab is enabled, iImage is used instead. The picture index refers to the ImageList control defined using the SFTTABS_TAB structure. If hImageList in the SFTTABS_TAB structure is NULL, the default ImageList defined using the SFTTABS_CONTROL structure is used instead.

Comments

The SFTTABS_GRAPH structure describes a tab's picture component and its location.

Applications developed using SftTabs/DLL 6.0 (or newer) should use the SFTTABS_TAB, TabPicture member to define the tab picture. Only the location member of this structure is used to define the location of the tab picture.

There are no default tab bitmaps or icons. Bitmap and icon handles are owned by the application. The handles have to remain valid until they are no longer used by the tab control, usually until the tab control is destroyed. The application is responsible for deleting the handles when they are no longer used.

See Also  C/C++ API  |  C++ Classes  |  Notifications


Feedback / comments / error reports for this topic
© 2016 - Softel vdm, Inc. - www.softelvdm.com