X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/04bea5f8fd259cf3e709c225eaa3b2f3c41cb2af..ac1f013c401dd0e907be2d32a027b7b61a5dbe3e:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index c0ac14e681..0e04fab578 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1146,9 +1146,11 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const // using this flag results in very significant reduction in flicker, // especially with controls inside the static boxes (as the interior of the - // box is not redrawn twice). - // wxCLIP_CHILDREN support is for compatibility with old applications only. - if ((!wxSystemOptions::GetOptionInt(wxT("msw.window.no-clip-children")) == 1) || (flags & wxCLIP_CHILDREN)) + // box is not redrawn twice).but sometimes results in redraw problems, so + // optionally allow the old code to continue to use it provided a special + // system option is turned on + if ( !wxSystemOptions::GetOptionInt(wxT("msw.window.no-clip-children")) + || (flags & wxCLIP_CHILDREN) ) style |= WS_CLIPCHILDREN; // it doesn't seem useful to use WS_CLIPSIBLINGS here as we officially @@ -2200,7 +2202,6 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l { bool allow; WXLRESULT result; - WXHICON hIcon; WXHBRUSH hBrush; } rc; @@ -4268,18 +4269,27 @@ bool wxWindowMSW::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control) return GetEventHandler()->ProcessEvent(event); } -#if wxUSE_SPINCTRL && !defined(__WXUNIVERSAL__) else { +#if wxUSE_SPINCTRL && !defined(__WXUNIVERSAL__) // the text ctrl which is logically part of wxSpinCtrl sends WM_COMMAND // notifications to its parent which we want to reflect back to // wxSpinCtrl wxSpinCtrl *spin = wxSpinCtrl::GetSpinForTextCtrl(control); if ( spin && spin->ProcessTextCommand(cmd, id) ) return true; - } #endif // wxUSE_SPINCTRL +#if wxUSE_CHOICE && defined(__SMARTPHONE__) + // the listbox ctrl which is logically part of wxChoice sends WM_COMMAND + // notifications to its parent which we want to reflect back to + // wxChoice + wxChoice *choice = wxChoice::GetChoiceForListBox(control); + if ( choice && choice->MSWCommand(cmd, id) ) + return true; +#endif + } + return false; }