77 DECLARE_WND_SUPERCLASS(_T(
"CComboBoxPlus"), CComboBox::GetWndClassName())
118 bool m_bAutoAdjustDropWidth;
119 int m_iMaxDropDownWidth;
129 void UpdateBrushes();
130 void DeleteBrushes();
132 COLORREF m_ControlTextColor;
133 COLORREF m_ControlBackColor;
135 COLORREF m_ControlFocusedBackColor;
136 COLORREF m_ControlFocusedTextColor;
138 COLORREF m_ListBoxTextColor;
139 COLORREF m_ListBoxBackColor;
141 HBRUSH m_ControlBackBrush;
142 HBRUSH m_ControlFocusedBackBrush;
143 HBRUSH m_ListBoxBackBrush;
146 LRESULT OnCtlColorControl(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
147 HBRUSH OnCtlColorListBox(CDCHandle dc, CListBox listBox);
152 MSG_WM_CTLCOLORLISTBOX(OnCtlColorListBox)
153 MESSAGE_HANDLER(WM_CTLCOLOREDIT, OnCtlColorControl)
154 MESSAGE_HANDLER(WM_CTLCOLORSTATIC, OnCtlColorControl)
155 DEFAULT_REFLECTION_HANDLER()
void SetMaxDropDownWidth(int value)
Sets the upper limit to the width of the dropdown list, if it is being automatically adjusted...
void SetListBoxBackColor(COLORREF value)
Set a new background color for the listbox portion of the combobox.
void SetListBoxTextColor(COLORREF value)
Set a new text color for the listbox portion of the combobox.
COLORREF GetListBoxBackColor() const
Default: COLOR_WINDOW.
void SubclassComboBox(HWND hWnd)
Subclass a combobox control and create GDI brushes.
void UnSubclassComboBox()
Un-subclass main and component windows; free GDI resources.
COLORREF GetControlFocusedBackColor() const
Default: COLOR_WINDOW.
bool GetAutoAdjustDropRectWidth() const
Default: true.
void SetAutoAdjustDropRectWidth(bool value)
Change the AutoAdjustRectWidth state.
COLORREF GetControlBackColor() const
Default: COLOR_WINDOW.
int GetMaxDropDownWidth() const
Default: 400 pixels.
A CComboBox descendant providing customizable background and text colors for both the edit and list b...
void SetControlFocusedTextColor(COLORREF value)
Set a new text color for the control portion of the combobox when it has focus.
void UpdateDropDownWidth()
Force an update of the width of the drop down list.
bool GetReadOnly() const
Default: false.
COLORREF GetControlFocusedTextColor() const
Default: CLR_RED.
void SetControlFocusedBackColor(COLORREF value)
Set a new background color for the control portion of the combobox when it has focus.
COLORREF GetControlTextColor() const
Default: COLOR_WINDOWTEXT.
void SetControlTextColor(COLORREF value)
Set a new text color for the control portion of the combobox when it doesn't have focus...
void SetReadOnly(bool read_only=true)
Change the read-only state of the combobox.
COLORREF GetListBoxTextColor() const
Default: COLOR_WINDOWTEXT.
void SetControlBackColor(COLORREF value)
Sets a new background color for the control portion of the combobx when it doesn't have focus...