]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/toolbar.cpp
Fix wxMSW build without PCH after recent wxPanel changes.
[wxWidgets.git] / src / msw / toolbar.cpp
index 5ab71b53b5c8b18450f3f4194d7a577a94caac1d..38067f00d05cb11c0037df8a5430c5c10328634c 100644 (file)
@@ -1722,10 +1722,18 @@ bool wxToolBar::HandlePaint(WXWPARAM wParam, WXLPARAM lParam)
             {
                 // for some reason TB_GETITEMRECT returns a rectangle 1 pixel
                 // shorter than the full window size (at least under Windows 7)
-                // but we need to erase the full height below
+                // but we need to erase the full width/height below
                 RECT rcItem = wxGetTBItemRect(GetHwnd(), toolIndex);
-                rcItem.top = 0;
-                rcItem.bottom = rectTotal.height;
+                if ( IsVertical() )
+                {
+                    rcItem.left = 0;
+                    rcItem.right = rectTotal.width;
+                }
+                else
+                {
+                    rcItem.top = 0;
+                    rcItem.bottom = rectTotal.height;
+                }
 
                 rgnDummySeps.Union(wxRectFromRECT(rcItem));
             }