Defines an item's row header text.
C
int WINAPI SftBox_GetRowText(HWND hwndCtl, LONG indexTC, LPTSTR lpszBuffer); BOOL WINAPI SftBox_SetRowText(HWND hwndCtl, LONG indexTC, LPCTSTR lpszText);
C++
int CSftBox::GetRowText(LONG indexTC, LPTSTR lpszBuffer) const; BOOL CSftBox::SetRowText(LONG indexTC, LPCTSTR lpszText);
hwndCtl
The window handle of the combo box control.
indexTC
The zero-based index of the item for which the row header text is to be retrieved or set.
lpszBuffer
A pointer to a buffer where the row header text will be returned. The buffer must be large enough to hold the complete row header text, including the terminating '\0'.
lpszText
The new row header text. This parameter may be NULL to remove the item's row header text.
GetRowText returns the number of characters returned in the buffer, not including the terminating '\0'. -1 is returned if the item index is invalid.
SetRowText returns TRUE if the function was successful, otherwise FALSE is returned.
The GetRowText and SetRowText functions define an item's row header text.
GetRowTextLength can be used to determine the required lpszBuffer size.
Row header text may contain multiple lines of text, delimited using cr-lf (\r\n) based on the settings defined using SetRowHeaderLines.
If the item is the currently selected item, the static portion is updated also.
Row headers are made visible using SetShowRowHeader.
In a combo box control using a virtual data source, SetRowText cannot be used and FALSE is returned. The lpszRowHeader member of the SFTBOX_ITEM structure is used instead.
See Also C/C++ API | Categories | Notifications