Hide

SftTabs/DLL 6.5 - Tab Control

Display
Print

SFTTABS_CONTROL Structure

Describes a tab control's layout and attributes.

typedef struct tagSftTabsControl {

    /* Modifiable fields */
    int style;                          /* tab style */
    int nRows;                          /* number of rows */
    int nRowTabs;                       /* number of tabs per row (if fFixed) */
    int leftMargin;                     /* width of left margin */
    int rightMargin;                    /* width of right margin */
    BOOL fFixed;                        /* same width for all tabs */
    BOOL fClientArea;                   /* Client area wanted */
    BOOL fMultiline;                    /* allow mulitline label text */
    BOOL fDialog;                       /* use with dialog */
    BOOL fTextOnly;                     /* use specified background color only for text */
    BOOL fScrollable;                   /* scrollable tabs */
    BOOL fHideScrollButtons;            /* hide scroll buttons */
    BOOL fBoldFont;                     /* use bold font for active tab */
    BOOL fFillComplete;                 /* fill rows completely */
    HBITMAP hButtonBitmap;              /* Scroll Button bitmap */
    LPVOID lpTabData;                   /* Data/Dialog associated with active tab */
    HWND hwndSubDlg;                    /* Subdialog associated with active tab */
    HWND hwndFrame;                     /* Frame, used as client area */
    short fToolTips;                    /* Tooltips wanted */
    short fDropText;                    /* drop text if it doesn't fit*/
    short fCondScrollButtons;           /* conditional scroll buttons*/
    short buttonStyle;                  /* scroll button style */
    short fEllipse;                     /* truncate text with '...' */
    short fFlyby;                       /* Flyby highlighting */
    short fUseClientAreaColor;          /* use client area colors in partially obscured frames */
    short fScrollOnLeft;                /* scroll buttons on left side */
    short rowIndent;                    /* row indentation */
    short fNoTruncatePattern;           /* don't show truncated pattern for clipped tab */
    short fButtonFullSize;              /* Scroll buttons as large as tabs */

    // the following inserted fields have rendered 4.0 incompatible with 3.5
    short fAllowThemes;                 /* Allow themes WinXP*/
    short fUseExactRegion;              /* Use exact window region */
    short fAlwaysShowAccel;             /* always show _ */
    DWORD defaultAnimationTimeShow;     /* # of milliseconds for animation */
    DWORD defaultAnimationStyleShow;    /* type of animation */
    DWORD defaultAnimationTimeHide;     /* not supported */
    DWORD defaultAnimationStyleHide;    /* not supported */
    // the following inserted fields have rendered 4.5 incompatible with 4.0
    HBITMAP hButtonBitmapDisabled;      /* Scroll Button bitmap (disabled images) */
    BOOL fShowFocusRectangle;           /* Show the focus rectangle if the control has i/p focus */
    // the following inserted fields have rendered 5.0 incompatible with 4.5
    short fClosable;                    // TRUE if Close button wanted
    short fCloseDisabled;               // TRUE if Close button disabled
    short fSendWMCLOSE;                 // TRUE if WM_CLOSE message wanted
    short fCloseFullSize;               // TRUE if Close button is full size
    short buttonAlignment;              // Scroll button alignment
    short closeButtonAlignment;         // Close button alignment
    short fMinimizeButton;              // Minimize button wanted
    short fMinimizeDisabled;            // TRUE if Minimize button disabled
    short fRestoreButton;               // Restore button wanted
    short fRestoreDisabled;             // TRUE if Restore button disabled
    HBITMAP hButtonBitmap2;             /* Close, Minimize, Restore button bitmap */
    HBITMAP hButtonBitmap2Disabled;     /* Close, Minimize, Restore button bitmap (disabled images) */
    TCHAR szLeftToolTip[80], szRightToolTip[80], szCloseToolTip[80], szMinimizeToolTip[80], szRestoreToolTip[80]; // tooltips
    long nCustomCode;                   // custom modifications
    // the following inserted fields have rendered 6.0 incompatible with 5.0
    int forcedSize;                     // forced height/width depending on tab style - 0 to ignore
    BOOL fSwitchOnRelease;              // switch tabs on button release (or down if FALSE)
    BOOL fCompatibleRendering;          // Rendering compatible with pre-6.0
    BOOL fNoBorder;                     // don't display clientarea border - select styles only
    // the following inserted fields have rendered 6.5 incompatible with 6.0 */
    short tabsAlignment;                /* alignment of tabs on a row */
    short layoutMode;                   /* tab layout mode */
    short autoFlowMinRows, autoFlowMaxRows; /* minimum, maximum number of rows (layoutMode autoflow) */
    BOOL fReorder;                      /* allow tab reordering */
    BOOL fDragDrop;                     /* allow dragging tabs elsewhere */
    // end of inserted incompatible area
    //RFFU

    /* read/only fields */
    int nTabs;                          /* number of tabs */
    RECT ClientRect;                    /* Area useable by application */
    BOOL fLeftButton, {linktarget "fRightButton" fRightButton;     /* TRUE if scrolling in that direction possible (if fScrollable) */
    int visibleLeftTab;                 /* leftmost tab in first row (if fScrollable) */
    int naturalSize;                    /* Best height/width depending on tab style */
    short fUsingThemes;                 /* True if actually using themes */
    // the following inserted fields have rendered 6.0 incompatible with 5.0
    short highlightTabIndex;            // tab currently highlighted (flyby highlighting)
    BOOL fGDIPlus;                      // TRUE if GDI+ available
    int lastErrorValue;                 // last SetControlInfo error value
    // the following inserted fields have rendered 6.5 incompatible with 6.0
    BOOL fThemesActive;                 /* Windows themes are active */
    BOOL fClippedText;                  /* clipped text present */
    BOOL fLabelDropped;                 /* labels are dropped */
    BOOL fScrollDropped;                /* scroll buttons are temporarily dropped */
    // end of inserted incompatible area
    //RFFU

    /* Modifiable run-time fields */
    HBITMAP hOutsideBitmap;             /* Background bitmap for areas not covered by tabs */
    short xOutside, yOutside;           /* Offset */
    HBITMAP hInsideBitmap;              /* Tab control background bitmap */
    short xInside, yInside;             /* Offset */
    HIMAGELIST hImageList;              /* default imagelist used for all tabs */

} SFTTABS_CONTROL, * LPSFTTABS_CONTROL;
typedef const SFTTABS_CONTROL * LPCSFTTABS_CONTROL;
#define SFTTABS_ERR_nRows               100
#define SFTTABS_ERR_leftMargin          101
#define SFTTABS_ERR_rightMargin         102
#define SFTTABS_ERR_nRowTabs_fFixed     103
#define SFTTABS_ERR_fClientArea         104
#define SFTTABS_ERR_fScrollable         105
#define SFTTABS_ERR_hButtonBitmap       106
#define SFTTABS_ERR_hButtonBitmapDisabled 107
#define SFTTABS_ERR_fHideScrollButtons  108
#define SFTTABS_ERR_fMultiline          109
#define SFTTABS_ERR_fCondScrollButtons  110
#define SFTTABS_ERR_fScrollable_fCondScrollButtons_fHideScrollButtons 111
#define SFTTABS_ERR_buttonStyle         112
#define SFTTABS_ERR_fScrollOnLeft       113
#define SFTTABS_ERR_hButtonBitmap2      114
#define SFTTABS_ERR_hButtonBitmap2Disabled 115
#define SFTTABS_ERR_buttonAlignment     116
#define SFTTABS_ERR_closeButtonAlignment    117
#define SFTTABS_ERR_forcedSize          118
#define SFTTABS_ERR_tabsAlignment       119
#define SFTTABS_ERR_layoutMode          120
#define SFTTABS_ERR_autoFlowMinRows     121
#define SFTTABS_ERR_autoFlowMaxRows     122

Members

style

The tab control style. This value defines the basic look of the tab control.

The SftTabs/DLL Wizard should be used to define all values in this structure.

The tab style values (SFTTABSSTYLE_xxx) can be found in the header file SftTb.h in the directory \Program Files (x86)\Softelvdm\SftTabs DLL 6.5\Include (unless changed during installation).

This value can be modified using SetControlInfo.

nRows

The number of tab rows. This value can be modified using SetControlInfo.

nRowTabs

if fFixed is TRUE, nRowTabs is used to set the number of tabs per row. If fewer tabs are available than specified in nRowTabs, the remainder of each row is left blank (fFillComplete == FALSE) or filled with disabled tabs (fFillComplete == TRUE), if fFixed is FALSE, this field should be set to 0. This value can be modified using SetControlInfo.

leftMargin

The number of pixels reserved for the left margin. This value can be modified using SetControlInfo.

rightMargin

The number of pixels reserved for the right margin. This value can be modified using SetControlInfo.

fFixed

The width of all tabs. If set to TRUE, all tabs will be of the same width (or height for vertical rows). If set to FALSE, tabs will be sized proportionally to their text and picture size and the available space. This value can be modified using SetControlInfo.

fClientArea

The availability of a client area, normally used for pages or Windows controls attached to tabs. If this is set to TRUE, a client area is available. The client area size can be found in clientRect. If this field is set to FALSE, a client area is not available. Not all tab styles support a client area. The SftTabs/DLL Wizard can be used to determine which tab styles support a client area. This value can be modified using SetControlInfo.

fMultiline

TRUE if multiline tab text is available, otherwise FALSE. When this field is TRUE, tab text can contain newline characters ("\r\n") to signal a new line. Not all tab styles support multiline tab text. The SftTabs/DLL Wizard can be used to determine which tab styles support multiline tab text. This value can be modified using SetControlInfo.

fDialog

TRUE if the tab control is used in a dialog instead of a window. This field determines some of the colors used for the tab control. Setting this field to FALSE and still using the tab control in a dialog doesn't cause any adverse effects. This field only determines the colors used by the tab control. If a tab control will be placed on a background that is not suitable for 3D rendering (usually a gray background), this field should be set to FALSE. The SftTabs/DLL Wizard can be used to determine the effect of this value. This value can be modified using SetControlInfo.

If the defined tab control style (see style) supports and uses themes, this value is ignored.

fTextOnly

TRUE if the tab background colors are used for the tab text only, otherwise the tab background colors (colorBg and colorBgSel in SFTTABS_TAB) are used to fill the entire tab. This value can be modified using SetControlInfo.

If the defined tab control style supports and uses themes, this value is ignored.

fScrollable

TRUE if the tab control offers scrollable tabs (and is restricted to one row of tabs). This value can be modified using SetControlInfo.

fHideScrollButtons

TRUE if the buttons used for tab scrolling are to be made invisible. If the scroll buttons are hidden, the only method to scroll the tabs is by using the keyboard interface or under program control. This value can be modified using SetControlInfo. This option has no effect if scrolling is not enabled.

fBoldFont

TRUE if the tab text of the currently active tab should be bold, FALSE if the same font should be used for active and inactive tabs. The tab text font can be set using the Windows WM_SETFONT message. If fBoldFont is TRUE and the default font for the tab control is already bold, the weight of the font used for inactive tabs will be reduced. This value can be modified using SetControlInfo.

fFillComplete

TRUE if the tab control should attempt to fill each tab row completely so the left and right margins are minimized. For fixed width tabs (fFixed is TRUE), additional blank, disabled tabs are added, for variable width tabs (fFixed is FALSE), the available space is distributed equally among all tabs so they grow (or shrink) proportionally. This value can be modified using SetControlInfo.

hButtonBitmap

A bitmap handle. The bitmap is used to display the graphics of the left and right (or up and down) scroll buttons. This parameter may be NULL. Default scroll button bitmaps are provided by SftTabs/DLL and can be seen using the SftTabs/DLL Wizard. This value can be modified using SetControlInfo.

The bitmap should contain two equal-sized images, arranged horizontally, so the height of the bitmap is the height of a button's bitmap and the width of the supplied bitmap is twice the width of a button's bitmap. The button size is automatically determined based on the bitmap size. The top, left pixel of each button bitmap must contain the background color. This color will be replaced by the actual window background color when the bitmap is displayed. Sample bitmaps can be found at \Program Files (x86)\Softelvdm\SftTabs DLL 6.5\Bitmaps.

If the defined tab control style (see style) supports and uses themes and Windows XP scroll buttons are defined (see buttonStyle), this value is ignored.

lpTabData

Stores a pointer, used for the C++ implementation of tabbed dialogs. For C, the member is not used, but reserved. For C++, the pointer points to the C++ object based on CSftTabsPage. This value can be modified using SftTabs_SetPageActive or SetControlInfo.

hwndSubDlg

Stores a window handle, used for the C and C++ implementation of tabbed dialogs. The window handle describes the page attached to the active tab. This value can be modified using SetTabInfo.

hwndFrame

Stores a window handle used by SftTabs/DLL as client area for pages attached to the tab control. SftTabs/DLL uses this window's client area size and location as a replacement for the tab control's client area. The window described by hwndFrame may be hidden and/or disabled. If an application resizes or moves the frame window, the dependent page or Windows control also has to be resized by the application. The dependent page can be found in hwndSubDlg. Using this frame window handle, the client area of a tab control can be located anywhere in relation to the tab control even on a different dialog or window. This value can be modified using SftTabs_ActivatePage, SetControlInfo, CSftTabsDialog::InitializeTabControl or CSftTabsWindowSheet::InitializeTabControl.

fToolTips

TRUE if the tab control should display ToolTips for tabs, the scroll buttons and the Minimize, Restore and Close buttons. ToolTip text for each tab has to be added using SetToolTip. ToolTips for the scroll buttons and the Minimize, Restore and Close buttons are defined using SetControlInfo. This value can be modified using SetControlInfo.

fDropText

TRUE if the tab control should drop tab labels, if the labels don't fit vertically and/or horizontally. This option should only be used if all tabs have a graphic component. If the tab label of any tab would be clipped, all tabs will drop the tab label temporarily. This is most useful with resizable tab controls where the user could potentially make the tab control very small, so that tab labels would be clipped. This value can be modified using SetControlInfo.

fCondScrollButtons

TRUE if the tab control should hide the scroll buttons when scrolling isn't possible because all tabs are visible. This is most useful with resizable tab controls where the user could potentially make the tab control very large, so that all tab labels can be displayed. This value can be modified using SetControlInfo. This option has no effect if scrolling is not enabled.

buttonStyle

The button style to be used for the scroll buttons and Minimize, Restore and Close buttons, if present. ButtonStyle can be one of the following values:

BMBUTTONSTYLE_31The button style is similar to buttons as used on Windows 3.1, with a thick button outline.
BMBUTTONSTYLE_95The button style is similar to buttons as used on Windows 95 (Windows NT 4.0) and higher, with a thin button outline.
BMBUTTONSTYLE_95_2The button style is identical to buttons as used on Windows 95 (Windows NT 4.0) and higher.
BMBUTTONSTYLE_STDThe button style is chosen based on the Windows operating system release used. On Windows 95 and NT 4.0 and higher, BMBUTTONSTYLE_95 is chosen. On Windows XP, BMBUTTONSTYLE_THEME_SCROLL is chosen.
BMBUTTONSTYLE_THEME_BUTTONA button style identical to buttons as used on Windows XP. If this style is used on an operating system version prior to Windows XP, this style is identical to BMBUTTONSTYLE_95_2.
BMBUTTONSTYLE_THEME_SCROLLA button style identical to scroll bar buttons and window frame buttons as used on Windows XP. If this style is used on an operating system version prior to Windows XP, this style is identical to BMBUTTONSTYLE_95_2.
BMBUTTONSTYLE_THEME_SCROLL2A button style identical to MDI-style buttons as used on Windows XP. If this style is used on an operating system version prior to Windows XP, this style is identical to BMBUTTONSTYLE_95_2.
BMBUTTONSTYLE_HOVER_BUTTONThis button style is similar to BMBUTTONSTYLE_95_2, but button borders are only visible when the mouse cursor is located above the button. Otherwise, only the button image defined using hButtonBitmap or hButtonBitmapDisabled is displayed.

This value can be modified using SetControlInfo.

fEllipse

TRUE if truncated text should display trailing '...'. This is most useful with resizable tab controls where the user could potentially make the tab control so small that tab labels can't be completely displayed and text would be truncated. This value can be modified using SetControlInfo.

fFlyby

TRUE if a tab's text should be highlighted if the mouse cursor is on the tab. A tab's text will be underlined and the color defined using SFTTABS_TAB, colorFlybyFg is used. This value can be modified using SetControlInfo.

If the defined tab control style (see style) supports and uses themes, this value should be set to TRUE.

fUseClientAreaColor

TRUE if a tab's client area color definition (see SFTTABS_TAB, colorClientArea) should be used as background color for frames of the tab control. If enabled, the colorClientArea specification is used as background color to fill the frame of rows appearing behind the current row. This value can be modified using SetControlInfo.

If the defined tab control style (see style) supports and uses themes, this value is ignored.

fScrollOnLeft

TRUE if the scroll buttons should appear on the left (or top) of the tab control. If FALSE is specified, the scroll buttons appear on the right (or bottom) of the tab control. This value can be modified using SetControlInfo. This option has no effect if scrolling is not enabled.

rowIndent

Specifies the indentation of rows in pixels. When multiple rows are displayed, they can be "offset" using the rowIndent value creating a cascading effect. If -1 is specified, the tab style's built-in indentation is used. Certain tab styles also use the rowIndent value for the first row to create a left/right margin. The SftTabs/DLL Wizard can be used to determine the effect rowIndent has on various tab styles. This value can be modified using SetControlInfo.

fNoTruncatePattern

TRUE if truncated tabs should not be displayed using a ragged edge. If FALSE is specified, a ragged edge is displayed to indicate that the tab is truncated. This value can be modified using SetControlInfo. This option has no effect if scrolling is not enabled.

fButtonFullSize

TRUE if scroll buttons should be the same height (or width) as the tabs in a scrollable tab control. If FALSE is specified, scroll buttons are sized to fit the scroll button bitmap. This value can be modified using SetControlInfo. This option has no effect if scrolling is not enabled.

fAllowThemes

User interface controls such as SftTabs/DLL adapt to the current theme defined using Control Panel. If a theme is defined, portions of the control can be painted by Windows using the current theme style. By setting fAllowThemes to TRUE, SftTabs/DLL will use the defined theme style (see Control Panel) on Windows XP to render the control. If the Windows version used does not support themes, this option is ignored. If fAllowThemes is set to FALSE, themes are never used. Because rendering portions of the control is performed by Windows, only a few tab styles can support themes. For all other styles, this option is ignored. If Windows themes are used, the fUsingThemes value is set to TRUE. This value can be modified using SetControlInfo.

fUseExactRegion

By setting fUseExactRegion to TRUE, the control will define its exact outline using the Windows SetWindowRgn API. This allows the parent window's background to show through the unused portions of the typically non-rectangular shape of the tab control. An application can retrieve the defined Windows region using the Windows SetWindowRgn API. This value can be modified using SetControlInfo.

fAlwaysShowAccel

The keyboard accelerator prefix character ("_") may be suppressed until the user presses the Alt key. By setting fAlwaysShowAccel to TRUE, the prefix character is always displayed. Otherwise, the prefix character is displayed based on the Control Panel settings. For Windows versions prior to Windows 2000, this option is ignored. This value can be modified using SetControlInfo.

defaultAnimationTimeShow

Defines the default transition effect when displaying any of the tab pages attached to this tab. Defines the amount of time to be used for the transition effect. Individual tabs can override this default using SFTTABS_TAB, animateTimeShow. This value can be modified using SetControlInfo. Use any of the following values:

0No default transition effect.
millisecondsThe default amount of elapsed time to be used for the transition effect, in milliseconds.

defaultAnimationStyleShow

Defines the default visual transition effect. This value is ignored if defaultAnimationTimeShow is not a positive number defining an elapsed time. Individual tabs can override this default using SFTTABS_TAB, animateStyleShow. This value can be modified using SetControlInfo. Use one of the following values:

SFTTABS_ROLL_FROM_LEFTRolls the page into view, starting at the left edge.
SFTTABS_ROLL_FROM_RIGHTRolls the page into view, starting at the right edge.
SFTTABS_ROLL_FROM_TOPRolls the page into view, starting at the top edge.
SFTTABS_ROLL_FROM_BOTTOMRolls the page into view, starting at the bottom edge.
SFTTABS_SLIDE_FROM_LEFTSlides the page into view, starting at the left edge.
SFTTABS_SLIDE_FROM_RIGHTSlides the page into view, starting at the right edge.
SFTTABS_SLIDE_FROM_TOPSlides the page into view, starting at the top edge.
SFTTABS_SLIDE_FROM_BOTTOMSlides the page into view, starting at the bottom edge.
SFTTABS_EXPAND_CENTERDisplays the page, expanding it from the center outwards.

defaultAnimationTimeHide

Reserved for future use. Must be initialized to 0.

defaultAnimationStyleHide

Reserved for future use. Must be initialized to 0.

hButtonBitmapDisabled

A bitmap handle. The bitmap is used to display the graphics of the left and right (or up and down) scroll buttons, when the button is disabled. This parameter may be NULL, in which case the bitmap defined using hButtonBitmap is used to create a grayed bitmap representing a disabled button image. This value can be modified using SetControlInfo.

The bitmap should contain two equal-sized images, arranged horizontally, so the height of the bitmap is the height of a button's bitmap and the width of the supplied bitmap is twice the width of a button's bitmap. The button size is automatically determined based on the bitmap size. The top, left pixel of each button bitmap must contain the background color. This color will be replaced by the actual window background color when the bitmap is displayed. Sample bitmaps can be found at \Program Files (x86)\Softelvdm\SftTabs DLL 6.5\Bitmaps.

If the defined tab control style (see style) supports and uses themes and Windows XP scroll buttons are defined (see buttonStyle), this value is ignored.

fShowFocusRectangle

TRUE if the tab control displays a focus rectangle around the text of the tab label, when the control has the input focus. If FALSE is specified, the control never displays a focus rectangle. This value can be modified using SetControlInfo.

fClosable

TRUE if the tab control displays a Close button. If FALSE is specified, the control doesn't display a Close button. The Close button generates SFTTABSN_CLOSEBUTTON notifications or WM_CLOSE message, based on the fSendWMCLOSE member settings. This value can be modified using SetControlInfo.

fCloseDisabled

TRUE if the Close button is disabled. If FALSE is specified, the Close button is enabled. If the Close button is disabled, no notifications or messages are generated when the user clicks the Close button. This option has no effect if the Close button is not available. This value can be modified using SetControlInfo.

fSendWMCLOSE

TRUE if the Close button generates a WM_CLOSE message. If FALSE is specified, the Close button generates SFTTABSN_CLOSEBUTTON notifications. This option has no effect if the Close button is not available. This value can be modified using SetControlInfo.

fCloseFullSize

TRUE if the Minimize, Restore and Close buttons should be the same height (or width) as the tabs in the tab control. If FALSE is specified, buttons are sized to fit the button bitmaps. This option has no effect if the Close button is not available. This value can be modified using SetControlInfo.

buttonAlignment

The alignment to be used for the scroll buttons, if present. This value can be modified using SetControlInfo. buttonAlignment can be one of the following values:

SFTTABS_BUTTON_NEARThe scroll buttons appear near the tab control's visible border (touching the border of the tab page).
SFTTABS_BUTTON_CENTERThe scroll buttons appear centered within the tab control's visible border and the outside edge of the tab control window.
SFTTABS_BUTTON_FARThe scroll buttons appear aligned with the outside edge of the tab control window.

This value can be modified using SetControlInfo.

closeButtonAlignment

The alignment to be used for the Minimize, Restore and Close buttons, if present. This value can be modified using SetControlInfo. closeButtonAlignment can be one of the following values:

SFTTABS_BUTTON_NEARThe buttons appear near the tab control's visible border (touching the border of the tab page).
SFTTABS_BUTTON_CENTERThe buttons appear centered within the tab control's visible border and the outside edge of the tab control window.
SFTTABS_BUTTON_FARThe buttons appear aligned with the outside edge of the tab control window.

This value can be modified using SetControlInfo.

fMinimizeButton

TRUE if the tab control displays a Minimize button. If FALSE is specified, the control doesn't display a Minimize button. The Minimize button generates SFTTABSN_MINIMIZEBUTTON notifications. This value can be modified using SetControlInfo.

fMinimizeDisabled

TRUE if the Minimize button is disabled. If FALSE is specified, the Minimize button is enabled. If the Minimize button is disabled, no notifications are generated when the user clicks the Minimize button. This option has no effect if the Minimize button is not available. This value can be modified using SetControlInfo.

fRestoreButton

TRUE if the tab control displays a Restore button. If FALSE is specified, the control doesn't display a Restore button. The Restore button generates SFTTABSN_RESTOREBUTTON notifications. This value can be modified using SetControlInfo.

fRestoreDisabled

TRUE if the Restore button is disabled. If FALSE is specified, the Restore button is enabled. If the Restore button is disabled, no notifications are generated when the user clicks the Restore button. This option has no effect if the Restore button is not available. This value can be modified using SetControlInfo.

hButtonBitmap2

A bitmap handle. The bitmap is used to display the graphics of the enabled Minimize, Restore, Close buttons. This parameter may be NULL. Default Minimize, Restore, Close buttons bitmaps are provided by SftTabs/DLL and can be seen using the SftTabs/DLL Wizard. This value can be modified using SetControlInfo.

The bitmap should contain three equal-sized images, arranged horizontally, so the height of the bitmap is the height of a button's bitmap and the width of the supplied bitmap is three times the width of a button's bitmap. The button size is automatically determined based on the bitmap size. The top, left pixel of each button bitmap must contain the background color. This color will be replaced by the actual window background color when the bitmap is displayed. Sample bitmaps can be found at \Program Files (x86)\Softelvdm\SftTabs DLL 6.5\Bitmaps.

If the defined tab control style (see style) supports and uses themes and Windows XP scroll buttons are defined (see buttonStyle), this value is ignored.

hButtonBitmap2Disabled

A bitmap handle. The bitmap is used to display the graphics of the disabled Minimize, Restore, Close buttons. This parameter may be NULL. Default Minimize, Restore, Close buttons bitmaps are provided by SftTabs/DLL and can be seen using the SftTabs/DLL Wizard. This value can be modified using SetControlInfo.

The bitmap should contain three equal-sized images, arranged horizontally, so the height of the bitmap is the height of a button's bitmap and the width of the supplied bitmap is three times the width of a button's bitmap. The button size is automatically determined based on the bitmap size. The top, left pixel of each button bitmap must contain the background color. This color will be replaced by the actual window background color when the bitmap is displayed. Sample bitmaps can be found at \Program Files (x86)\Softelvdm\SftTabs DLL 6.5\Bitmaps.

If the defined tab control style (see style) supports and uses themes and Windows XP scroll buttons are defined (see buttonStyle), this value is ignored.

szLeftToolTip

Defines the ToolTip displayed by the left/up scroll button. This value can be modified using SetControlInfo.

szRightToolTip

Defines the ToolTip displayed by the right/down scroll button. This value can be modified using SetControlInfo.

szCloseToolTip

Defines the ToolTip displayed by the Close button. This value can be modified using SetControlInfo.

szMinimizeToolTip

Defines the ToolTip displayed by the Minimize button. This value can be modified using SetControlInfo.

szRestoreToolTip

Defines the ToolTip displayed by the Restore button. This value can be modified using SetControlInfo.

nCustomCode

Defines optional product customization. Valid values are made available by Product Support, in response to purchased enhancements, special features, etc. and are only available upon request. This value can be modified using SetControlInfo.

forcedSize

Defines the height/width of one tab row, in pixels. Set to 0 to let the control calculate the optimal height/width. The forcedSize member defines the height of a tab row in a horizontal tab control and the width in a vertical tab control. This value can be modified using SetControlInfo.

The forcedSize member can be used to specify the exact height of a row to align the control with other controls on the same dialog.

fSwitchOnRelease

Defines whether tab switching occurs as the user presses or releases the mouse button on a tab. Set to TRUE to switch tabs as the user releases the mouse button, otherwise set to FALSE to switch tabs as soon as the user presses the mouse button. This value can be modified using SetControlInfo.

fCompatibleRendering

Defines whether the tab control is internally processed as in earlier releases (pre-6.0) or using a new, even smoother, but more resource intensive method. Set to TRUE to use the old method, otherwise FALSE to use the new method. This value can be modified using SetControlInfo.

The control automatically uses a suitable default for fCompatibleRendering. On Windows XP and newer, this member is set to FALSE. On earlier Windows versions, this member is set to TRUE.

fNoBorder

Defines whether the tab page border is suppressed. Set to TRUE to suppress the tab page border from being painted, otherwise FALSE. This value can be modified using SetControlInfo.

This member is only used for the button tab styles (SFTTABSSTYLE_BUTTONS_xxx).

tabsAlignment

Defines the alignment of tabs within rows. tabsAlignment can be one of the following values:

SFTTABS_TABS_LEFTThe tabs are left aligned (or top aligned when tab rows are vertical).
SFTTABS_TABS_RIGHTThe tabs are right aligned (or bottom aligned when tab rows are vertical).

This value can be modified using SetControlInfo.

layoutMode

Defines the distribution of tabs within the tab rows. layoutMode can be one of the following values:

SFTTABS_LAYOUT_DISTRIBUTEThe tabs are distributed equally within all available rows.
SFTTABS_LAYOUT_FLOWRows are filled with tabs (front first) without truncating or dropping tab labels until all available rows defined using nRows are filled. If insufficient space is available, some tabs labels may still be dropped or truncated.
SFTTABS_LAYOUT_AUTOFLOWRows are filled with tabs (front first) without truncating or dropping tab labels and the required number of rows is automatically determined. If insufficient space is available, some tabs labels may still be dropped or truncated. The members autoFlowMinRows and autoFlowMaxRows are used to determine the minimum and maximum number of rows allowed when distributing tabs.

This value can be modified using SetControlInfo.

autoFlowMinRows

Defines the minimum number of rows required when distributing tabs (layoutMode == SFTTABS_LAYOUT_AUTOFLOW only). This value can be modified using SetControlInfo.

autoFlowMaxRows

Defines the maximum number of rows allowed when distributing tabs (layoutMode == SFTTABS_LAYOUT_AUTOFLOW only). This value can be modified using SetControlInfo.

fReorder

Defines whether tab reordering is enabled. Set to TRUE to enable tab reordering, otherwise FALSE. Tab reordering is only available for tab controls with one row of tabs (see nRows). This value can be modified using SetControlInfo.

fDragDrop

Defines whether drag & drop is enabled. Set to TRUE to enable drag & drop, otherwise FALSE. This value can be modified using SetControlInfo.

nTabs

The currently defined number of tabs. This value cannot be modified. Use AddTab, InsertTab or DeleteTab instead.

ClientRect

The location of the client area in tab control coordinates, where the top left corner of the tab control is at 0,0. If fClientArea is FALSE (no client area is present), an empty rectangle is returned. This value cannot be modified.

fLeftButton

TRUE if the tab control supports scrolling and scrolling left (or up in a vertical tab control) is currently possible. This member can be used when an application provides its own scrolling mechanism, to query the tab control if scrolling is possible in this direction. This value cannot be modified.

fRightButton

TRUE if the tab control supports scrolling and scrolling right (or down in a vertical tab control) is currently possible. This member can be used when an application provides its own scrolling mechanism to query the tab control if scrolling is possible in this direction. This value cannot be modified.

visibleLeftTab

The index of the leftmost tab (or topmost in a vertical tab control) currently visible in a scrollable tab control. This value cannot be modified.

naturalSize

The ideal height of a tab control (or width of a vertical tab control). This field is only valid for tab controls that do not offer a client area (fClientArea == FALSE). This value can be used to determine the best height for a tab control with horizontal tab rows (or width for vertical rows). This value cannot be modified.

fUsingThemes

TRUE if the control is currently rendered using Windows themes (fAllowThemes is set to TRUE and the application is running on Windows XP or better). This value cannot be modified.

highlightTabIndex

The index of the tab currently highlighted (hot) due to flyby highlighting or -1 if no tab is highlighted. This value cannot be modified.

fGDIPlus

TRUE if the current application supports GDI+, otherwise FALSE. SftTabs/DLL automatically determines whether the application has GDI+ features available, so an application can use suitable tab pictures. This value cannot be modified.

lastErrorValue

Contains the value of the last error that occurred when SetControlInfo was called. This value must be retrieved after a call to SetControlInfo using the GetControlInfo function. The error value is not returned by the call to SetControlInfo.

Error codes are listed at the top of this page, along with their preprocessor symbol name. Each error code is named SFTTABS_ERR_, followed by the member (field) name that caused the error.

fThemesActive

TRUE if Windows themes are active for this application, FALSE otherwise.

fClippedText

TRUE if any of the tab labels have been clipped because there is insufficient space to display the entire tab label, otherwise FALSE, indicating that all tab labels are completely visible. This value cannot be modified.

fLabelDropped

TRUE if the tab labels have been dropped because there is insufficient space to display the tab labels, otherwise FALSE, indicating that all tab labels are shown. This value cannot be modified. Tab labels may be dropped if the fDropText member is set to TRUE.

fScrollDropped

TRUE if the scroll buttons have been dropped because scrolling is not possible (all tabs are shown), otherwise FALSE. This value cannot be modified. Scroll buttons may be dropped if the fCondScrollButtons member is set to TRUE.

hOutsideBitmap

A bitmap handle describing the bitmap used as the background of the area not covered by tabs, tab frames or the tab client area. Any reasonable size bitmap can be used. If the background bitmap is too small to fill the entire area of the tab control, it is tiled. Specify NULL to stop using a background bitmap. The bitmap specified is aligned with the top/left corner of the tab control window, unless the alignment is changed using xOutside and yOutside. This value can be modified using SetControlInfo.

If the tab control uses an exact window region (see fUseExactRegion), this value is ignored and a background bitmap is not available.

If the defined tab control style (see style) supports and uses themes, this value is ignored and a background bitmap is not available.

xOutside, yOutside

Specifies the x and y alignment offset of the background bitmap (hOutsideBitmap). The value specified must be greater than or equal to 0. If 0 is specified, the bitmap is aligned with the top/left corner of the tab control window. This value can be modified using SetControlInfo.

If the defined tab control style (see style) supports and uses themes, this value is ignored and a background bitmap is not available.

hInsideBitmap

A bitmap handle describing the bitmap used as the background of the tab control. This background bitmap is used for all tabs and tab frames. It is not used for the background outside of the tabs or client area. The background bitmap is not visible in the client area if child windows or child dialogs use the client area, which is normally the case in tabbed dialogs or windows. However, tabbed dialogs will automatically use this bitmap as background bitmap for the tab page (see Background). Any reasonable size bitmap can be used. If the background bitmap is too small to fill the entire area of the tab control, it is tiled. Specify NULL to stop using a background bitmap. The bitmap specified is aligned with the top/left corner of the tab control window, unless the alignment is changed using xInside and yInside. This value can be modified using SetControlInfo.

If the defined tab control style (see style) supports and uses themes, this value is ignored and a background bitmap is not available.

xInside, yInside

Specifies the x and y alignment offset of the background bitmap (hInsideBitmap). The value specified must be greater than or equal to 0. If 0 is specified, the bitmap is aligned with the top/left corner of the tab control window. This value can be modified using SetControlInfo.

If the defined tab control style (see style) supports and uses themes, this value is ignored and a background bitmap is not available.

hImageList

Defines the default ImageList control to be used for tab pictures, defined using SFTTABS_GRAPH. When adding or inserting tabs, the picture index is defined using the SFTTABS_TAB structure. Individual tabs can override the default ImageList using SetTabInfo (SFTTABS_TAB, hImageList). This value can be modified using SetControlInfo.

Comments

The SFTTABS_CONTROL structure is used to describe a tab control's layout and attributes.

The SFTTABS_CONTROL structure can be defined using the SftTabs/DLL Wizard.

While it is possible to specify a background bitmaps for a tab control using the SFTTABS_CONTROL structure members hOutsideBitmap and hInsideBitmap, these bitmaps, particularly the client area portion, are only visible if the tab control is not obscured by other windows. A dialog page or window attached to a tab will of course cover the client area and the background bitmap is not visible.

The SftTabs_PaintTiledBitmap function can be used to paint a tiled bitmap on a window. When using a background bitmap on a dialog, please note that the standard controls such as check boxes, static text controls, etc. do not allow the background bitmap to be visible (they are not transparent). Some third party controls do allow a transparent display, however, this is not a part of the product SftTabs/DLL.

Example

This example changes the number of tab rows.

C

SFTTABS_CONTROL Ctl;
SftTabs_GetControlInfo(hwndTab, &Ctl);
Ctl.nRows = 1;
SftTabs_SetControlInfo(hwndTab, &Ctl);

C++

SFTTABS_CONTROL Ctl;
m_Tab.GetControlInfo(&Ctl);
Ctl.nRows = 1;
m_Tab.SetControlInfo(&Ctl);

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


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.