X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0dba08dd3987303ff116bf77d5fb877b6d8f32d0..c3e57ac4ac9222d84ac208a493b57fb24e474a6a:/src/msw/toolbar.cpp?ds=sidebyside diff --git a/src/msw/toolbar.cpp b/src/msw/toolbar.cpp index 33c4950b30..58490dcdc7 100644 --- a/src/msw/toolbar.cpp +++ b/src/msw/toolbar.cpp @@ -1859,12 +1859,14 @@ WXLRESULT wxToolBar::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam #ifndef __WXWINCE__ case WM_PAINT: - if ( HandlePaint(wParam, lParam) ) + // refreshing the controls in the toolbar inside a composite window + // results in an endless stream of WM_PAINT messages -- and seems + // to be unnecessary anyhow as everything works just fine without + // any special workarounds in this case + if ( !IsDoubleBuffered() && HandlePaint(wParam, lParam) ) return 0; -#endif - - default: break; +#endif // __WXWINCE__ } return wxControl::MSWWindowProc(nMsg, wParam, lParam);