X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8f2c3ee9a0fb0457f81f4d70ad0077bf092b8a6a..6131340355ade5862a29f7a7149cd08f57028c98:/src/msw/combobox.cpp?ds=sidebyside diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 90f5da5765..e61f41c12b 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -259,6 +259,9 @@ WXLRESULT wxComboBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara break; case WM_SIZE: + // wxStaticBox can generate this message, when modifying the control's style. + // This causes the content of the combobox to be selected, for some reason. + case WM_STYLECHANGED: { // combobox selection sometimes spontaneously changes when its // size changes, restore it to the old value if necessary @@ -571,7 +574,7 @@ bool wxComboBox::CanUndo() const { if (!IsEditable()) return false; - + HWND hEditWnd = (HWND) GetEditHWND() ; if ( hEditWnd ) return ::SendMessage(hEditWnd, EM_CANUNDO, 0, 0) != 0; @@ -583,7 +586,7 @@ bool wxComboBox::CanRedo() const { if (!IsEditable()) return false; - + HWND hEditWnd = (HWND) GetEditHWND() ; if ( hEditWnd ) return ::SendMessage(hEditWnd, EM_CANUNDO, 0, 0) != 0; @@ -694,6 +697,10 @@ void wxComboBox::Replace(long from, long to, const wxString& value) // Paste into edit control SendMessage(GetHwnd(), WM_PASTE, (WPARAM)0, (LPARAM)0L); +#else + wxUnusedVar(from); + wxUnusedVar(to); + wxUnusedVar(value); #endif }