]> git.saurik.com Git - wxWidgets.git/commitdiff
don't use our custom WM_PAINT handler with composited window as this results in an...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 2 Aug 2008 22:34:37 +0000 (22:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 2 Aug 2008 22:34:37 +0000 (22:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/toolbar.h
src/msw/toolbar.cpp

index 217727881264eb07bbe0fe782f1b7eef5705d415..ce467dad50a33ca585244f0a457f157493fbb46c 100644 (file)
@@ -116,7 +116,9 @@ protected:
 
     // handlers for various events
     bool HandleSize(WXWPARAM wParam, WXLPARAM lParam);
+#ifndef __WXWINCE__
     bool HandlePaint(WXWPARAM wParam, WXLPARAM lParam);
+#endif // __WXWINCE__
     void HandleMouseMove(WXWPARAM wParam, WXLPARAM lParam);
 
     // should be called whenever the toolbar size changes
index 33c4950b307032a0dcd2df623e9a1b9b95f1a2a6..58490dcdc7358230c3e00295298e1b8710fce8ad 100644 (file)
@@ -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);