]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/toolbar.cpp
Call RecreateControls() if relevant window style flag was toggled
[wxWidgets.git] / src / msw / toolbar.cpp
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);