]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/statbox.cpp
fixed crash when using GTK theme
[wxWidgets.git] / src / msw / statbox.cpp
index df9cec55e2292ce64017570ceff2208afded3095..ec135e4af7802f2bde5e944220163d56baa9f19f 100644 (file)
@@ -455,7 +455,8 @@ void wxStaticBox::PaintForeground(wxDC& dc, const RECT& rc)
         // now draw the text
         if ( !rtl )
         {
-            ::DrawText(hdc, label, label.length(), &dimensions,
+            RECT rc2 = { x, 0, x + width, y };
+            ::DrawText(hdc, label, label.length(), &rc2,
                        DT_SINGLELINE | DT_VCENTER);
         }
         else // RTL