Defines the font used for column header text display.
C
HFONT WINAPI SftBox_GetColHeaderFont(HWND hwndCtl); void WINAPI SftBox_SetColHeaderFont(HWND hwndCtl, HFONT hFont, BOOL fRedraw);
C++
HFONT CSftBox::GetColHeaderFont() const; void CSftBox::SetColHeaderFont(HFONT hFont, BOOL fRedraw);
hwndCtl
The window handle of the combo box control.
hFont
The font handle describing the new font to be used to draw the column header and row/column header text.
fRedraw
Set to TRUE to cause the combo box to be repainted immediately, otherwise set to FALSE.
GetColHeaderFont returns the font used to draw the column header text.
The GetColHeaderFont and SetColHeaderFont functions define the font used for column header text display.
The font is used for the column headers of the static portion and of the dropdown portion. The layout of the combo box is recalculated, as the height of the column headers depends on the font.
The application retains ownership of the font and cannot delete the font until the combo box no longer uses the font (usually until the combo box is destroyed or the font is changed using SetColHeaderFont).
To change the font used for item text, use the WM_SETFONT message (CWnd::SetFont). The WM_SETFONT message overrides the font defined using SetColHeaderFont. If the column header font needs to be changed, it must be changed after using the WM_SETFONT message.
The font used for row header text can be defined using SetRowHeaderFont.
See Also C/C++ API | Categories | Notifications