HeaderPane
Main
Hide
Share Link
Print

CtlColors

Defines the combo box control's color attributes.

C

void WINAPI SftBox_GetCtlColors(HWND hwndCtl, LPSFTBOX_COLORS lpColors);
void WINAPI SftBox_SetCtlColors(HWND hwndCtl, LPCSFTBOX_COLORS lpColors);

C++

void CSftBox::GetCtlColors(LPSFTBOX_COLORS lpColors) const;
void CSftBox::SetCtlColors(LPCSFTBOX_COLORS lpColors);

Parameters

hwndCtl

The window handle of the combo box control.

lpColors

A pointer to a SFTBOX_COLORS structure containing the color definitions. GetCtlColors uses this structure to return the current color settings. SetCtlColors uses the contents of this structure to define the new color settings.

Comments

The GetCtlColors and SetCtlColors functions define the combo box control's color attributes.

To modify a control's color attributes, the GetCtlColors function is used to retrieve its current attributes. The SFTBOX_COLORS structure can then be modified, setting the desired attributes. Finally, the control's colors are updated by a call to the SetCtlColors function.

The colors apply to all portions of the combo box control (static portion, edit control portion, dropdown portion and dropdown button). SetCtlColors redraws the combo box control.

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).

Many color settings have no effect when Windows themes are used.

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


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