Defines a column's header text.
C
int WINAPI SftBox_GetHeader(HWND hwndCtl, int col, LPTSTR lpszBuffer, int cbMax); BOOL WINAPI SftBox_SetHeader(HWND hwndCtl, int col, LPCTSTR lpszText);
C++
int CSftBox::GetHeader(int col, LPTSTR lpszBuffer, int cbMax) const; BOOL CSftBox::SetHeader(int col, LPCTSTR lpszText);
hwndCtl
The window handle of the combo box control.
col
The zero-based column number whose header text is to be retrieved or set.
lpszBuffer
A pointer to a buffer where the header text will be returned.
cbMax
The size of the buffer pointed to by lpszBuffer in characters, including the terminating '\0'.
lpszText
A pointer to a string containing the new header text.
GetHeader returns the number of characters returned in the buffer, not including the terminating '\0', or -1 if col is not a valid column number.
SetHeader returns TRUE if the function was successful, otherwise FALSE is returned.
The GetHeader and SetHeader functions define a column's header text.
The header text is used for the column headers of the static portion and the dropdown portion. Column headers are shown using SetShowHeader.
If the header text does not fit into the buffer, GetHeader returns the first cbMax-1 characters, followed by a terminating '\0'. GetHeaderLength can be used to retrieve the length of the header text, so a buffer large enough for the complete text can be allocated.
The header text of all columns can also be defined and retrieved using SetColumns and GetColumns (SFTBOX_COLUMN, lpszTitle).
See Also C/C++ API | Categories | Notifications