HeaderPane
Main
Hide
Share Link
Print

SFTBOX_ROW Structure

The SFTBOX_ROW structure is used with GetRowInfo and SetRowInfo to retrieve and set row header attributes and as part of the SFTBOX_ITEM structure (for a virtual data source).

typedef struct tagSftBoxROW {
    COLORREF colorBg, colorFg;              // colors (SFTBOX_NOCOLOR if default wanted)
    COLORREF colorBgSel, colorFgSel;        // colors if selected
    HBITMAP obsoletehBmp;                   // not used
    short flag;                             // misc flag
    short flag2;
#define SFTBOX_ROW_COLORSOVERRIDETHEME 0x01 // set if this row header's colors override Windows theme colors
    short res1;                             // reserved
    DWORD res2;                             // reserved
    SFT_PICTURE RowPicture1;                // row header picture
} SFTBOX_ROW, * LPSFTBOX_ROW;

typedef const SFTBOX_ROW * LPCSFTBOX_ROW;

Members

colorBg

The background color used to draw the row header when the item is not selected. Specify SFTBOX_NOCOLOR to use the default background color.

colorFg

The foreground color used to draw the row header text when the item is not selected. Specify SFTBOX_NOCOLOR to use the default text color.

colorBgSel

The background color used to draw the row header when the item is selected. Specify SFTBOX_NOCOLOR to use the default background color.

colorFgSel

The foreground color used to draw the row header text when the item is selected. Specify SFTBOX_NOCOLOR to use the default text color.

obsoletehBmp

Not used. Set to NULL.

flag

The row header text and picture position. The text alignment and the vertical picture alignment override the default defined using SetRowHeaderStyle.

One value of each of the following tables can be combined and assigned to the flag member.

flagHorizontal row header picture alignment
SFTBOX_BMP_LEFTThe row header picture is displayed to the left of the row header text. If no horizontal row header picture alignment value is specified, SFTBOX_BMP_LEFT is assumed.
SFTBOX_BMP_CENTERThe row header picture is displayed in the center of the row header, the row header text is not shown.
SFTBOX_BMP_RIGHTThe row header picture is displayed to the right of the row header text.
flagVertical row header picture alignment
not specifiedThe default alignment value defined using SetRowHeaderStyle applies.
SFTBOX_BMP_VCENTERThe row header picture is vertically centered within the row header.
SFTBOX_BMP_TOPThe row header picture is vertically aligned with the top of the row header.
SFTBOX_BMP_BOTTOMThe row header picture is vertically aligned with the bottom of the row header.
flagHorizontal row header text alignment
not specifiedThe default alignment value defined using SetRowHeaderStyle applies.
SFTBOX_TEXT_LEFTThe row header text is left aligned within the row header.
SFTBOX_TEXT_CENTERThe row header text is centered within the row header.
SFTBOX_TEXT_RIGHTThe row header text is right aligned within the row header.
flagVertical row header text alignment
not specifiedThe default alignment value defined using SetRowHeaderStyle applies.
SFTBOX_TEXT_TOPThe row header text is aligned with the top of the row header.
SFTBOX_TEXT_VCENTERThe row header text is vertically centered within the row header.
SFTBOX_TEXT_BOTTOMThe row header text is aligned with the bottom of the row header.

flag2

Defines row header attributes.

flag2Description
0None.
SFTBOX_ROW_COLORSOVERRIDETHEMEDefines whether an application can override Windows themes and the row header colors are used to render the row header. If set, the defined colors (colorBg, colorFg, colorBgSel, colorFgSel) are used instead of Windows themes. If all colors are set to their default value (SFTBOX_NOCOLOR), Windows themes are used.

res1, res2

Reserved. Must be set to 0.

RowPicture1

Defines the row header picture displayed next to the row header text. The picture position is defined using the flag member. h1 Comments

The SFTBOX_ROW structure is used with GetRowInfo and SetRowInfo and as part of the SFTBOX_ITEM structure (for a virtual data source).

An RGB value or a GetSysColor index value can be specified for all color values. If a color index is used, the high-order bit must be set (e.g., COLOR_WINDOW | 0x80000000L).

A row header may have an associated row header picture without the picture actually being visible. The row header picture doesn't become visible until the row header picture size has been registered using SetRowInfo by setting the index member of the SFTBOX_ROWINFOPARM structure to -1.

Only one picture is used to register the picture size. After registering the picture size, any number of pictures may be used.

In a fixed height combo box control, all row header pictures used for all row headers must be the same size. A new picture size can be registered at any time, but all row header pictures in use must be replaced by pictures of the new size.

In a variable height combo box control (see SFTBOXSTYLE_VARIABLE), row header pictures can be of varying sizes. The largest picture size must be registered using SetRowInfo.

Row header text can be retrieved using GetRowText and modified using SetRowText.

Pointer typedefs: LPSFTBOX_ROW is a pointer to a SFTBOX_ROW structure, LPCSFTBOX_ROW is a pointer to a constant SFTBOX_ROW structure.

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


Last Updated 11/21/2026 - (email)
© 2026 Softel vdm, Inc.