Defines the row header display style.
C
int WINAPI SftBox_GetShowRowHeader(HWND hwndCtl); void WINAPI SftBox_SetShowRowHeader(HWND hwndCtl, int style);
C++
int CSftBox::GetShowRowHeader() const; void CSftBox::SetShowRowHeader(int style);
hwndCtl
The window handle of the combo box control.
style
A value describing the row header display style:
| SFTBOX_ROWSTYLE_NONE | No row headers. |
| SFTBOX_ROWSTYLE_BUTTONTEXT | Displays row headers as buttons. No default text. |
| SFTBOX_ROWSTYLE_TITLETEXT | Displays row headers as titles. No default text. |
| SFTBOX_ROWSTYLE_BUTTONCOUNT0 | Displays row headers as buttons. The row header text defaults to the zero-based index of the item and can be specified using SetRowText. |
| SFTBOX_ROWSTYLE_TITLECOUNT0 | Displays row headers as titles. The row header text defaults to the zero-based index of the item and can be specified using SetRowText. |
| SFTBOX_ROWSTYLE_BUTTONCOUNT1 | Displays row headers as buttons. The row header text defaults to the one-based index of the item and can be specified using SetRowText. |
| SFTBOX_ROWSTYLE_TITLECOUNT1 | Displays row headers as titles. The row header text defaults to the one-based index of the item and can be specified using SetRowText. |
GetShowRowHeader returns a value describing the current row header display style. The style is returned even while row headers are hidden because the row header width is 0.
The GetShowRowHeader and SetShowRowHeader functions define the row header display style.
The setting applies to the dropdown portion and the static portion of the combo box.
If the current style is set to SFTBOX_ROWSTYLE_BUTTONTEXT, SFTBOX_ROWSTYLE_BUTTONCOUNT0 or SFTBOX_ROWSTYLE_BUTTONCOUNT1, the row headers are displayed as buttons, which can be clicked by the user. Row header buttons reflect the selection status (see GetCurSel) of each item.
The value defined using SetShowRowHeader applies to all row headers and cannot be changed for individual items.
The width of the row headers can be defined using SetRowHeaderWidth. Row headers are only shown while the row header width is greater than 0. SetShowRowHeader with a style other than SFTBOX_ROWSTYLE_NONE shows the row headers, using a small default width if the current width is 0. Initially, the style is SFTBOX_ROWSTYLE_BUTTONCOUNT0 and the row header width is 0, so row headers are not shown. The position of the text displayed in the row headers can be defined using SetRowHeaderStyle.
See Also C/C++ API | Categories | Notifications