X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6341d8249f2952b8e19ddd208a42074eeed1f4dd..7848088476db284a94f19eeb24411b45d676ac46:/src/msw/combobox.cpp diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index e62a0ed5a7..26ef863e24 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -238,7 +238,7 @@ WXHBRUSH wxComboBox::OnCtlColor(WXHDC pDC, // wxComboBox callbacks // ---------------------------------------------------------------------------- -long wxComboBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) +WXLRESULT wxComboBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) { // handle WM_CTLCOLOR messages from our EDIT control to be able to set its // colour correctly (to be the same as our own one) @@ -253,7 +253,7 @@ long wxComboBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) WXHWND hwnd; UnpackCtlColor(wParam, lParam, &nCtlColor, &hdc, &hwnd); - return OnCtlColor(hdc, hwnd, nCtlColor, nMsg, wParam, lParam); + return (WXLRESULT)OnCtlColor(hdc, hwnd, nCtlColor, nMsg, wParam, lParam); } return wxChoice::MSWWindowProc(nMsg, wParam, lParam); @@ -581,13 +581,7 @@ void wxComboBox::SetSelection(long from, long to) toChar = -1; } - if ( -#ifdef __WIN32__ - SendMessage(hWnd, CB_SETEDITSEL, (WPARAM)0, (LPARAM)MAKELONG(fromChar, toChar)) -#else // Win16 - SendMessage(hWnd, CB_SETEDITSEL, (WPARAM)fromChar, (LPARAM)toChar) -#endif - == CB_ERR ) + if ( SendMessage(hWnd, CB_SETEDITSEL, (WPARAM)0, (LPARAM)MAKELONG(fromChar, toChar)) == CB_ERR ) { wxLogDebug(_T("CB_SETEDITSEL failed")); }