X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/db34b14756b38346928604f21e6707b950dcd733..19e30148e18cc99296b26503c155e5cef59045f4:/src/msw/combobox.cpp?ds=sidebyside diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 6d31e99dba..aa72d70d57 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -87,10 +87,13 @@ LRESULT APIENTRY _EXPORT wxComboEditWndProc(HWND hWnd, switch ( message ) { - // forward some messages to the combobox + // forward some messages to the combobox to generate the appropriate + // wxEvents from them case WM_KEYUP: case WM_KEYDOWN: case WM_CHAR: + case WM_SETFOCUS: + case WM_KILLFOCUS: { wxComboBox *combo = wxDynamicCast(win, wxComboBox); wxCHECK_MSG( combo, 0, _T("should have combo as parent") ); @@ -170,7 +173,7 @@ WXHBRUSH wxComboBox::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSE wxColour colBack = GetBackgroundColour(); if (!IsEnabled()) - colBack = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE); + colBack = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); ::SetBkColor(hdc, wxColourToRGB(colBack)); ::SetTextColor(hdc, wxColourToRGB(GetForegroundColour())); @@ -196,6 +199,12 @@ bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam) case WM_KEYUP: return HandleKeyUp(wParam, lParam); + + case WM_SETFOCUS: + return HandleSetFocus((WXHWND)wParam); + + case WM_KILLFOCUS: + return HandleKillFocus((WXHWND)wParam); } return FALSE; @@ -313,7 +322,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, // A choice/combobox normally has a white background (or other, depending // on global settings) rather than inheriting the parent's background colour. - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW)); + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); for ( int i = 0; i < n; i++ ) {