]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/statbox.cpp
Correctly parse times without seconds in wxDateTime::ParseTime().
[wxWidgets.git] / src / msw / statbox.cpp
index ca3066741505fe22cb4c45cb4bd03dd71b4d9ab7..0a5b78abd29f011495f93c4486d82dc799fd4061 100644 (file)
@@ -41,6 +41,7 @@
 #include "wx/msw/uxtheme.h"
 #include "wx/msw/private.h"
 #include "wx/msw/missing.h"
+#include "wx/msw/dc.h"
 
 // the values coincide with those in tmschema.h
 #define BP_GROUPBOX 4
@@ -258,7 +259,7 @@ SubtractRectFromRgn(HRGN hrgn, int left, int top, int right, int bottom)
     AutoHRGN hrgnRect(::CreateRectRgn(left, top, right, bottom));
     if ( !hrgnRect )
     {
-        wxLogLastError(_T("CreateRectRgn()"));
+        wxLogLastError(wxT("CreateRectRgn()"));
         return;
     }
 
@@ -364,7 +365,7 @@ void wxStaticBox::PaintBackground(wxDC& dc, const RECT& rc)
     //     see http://groups.google.com/groups?selm=4252E932.3080801%40able.es
     wxWindow *parent = GetParent();
     wxMSWDCImpl *impl = (wxMSWDCImpl*) dc.GetImpl();
-    HBRUSH hbr = (HBRUSH)parent->MSWGetBgBrush(impl->GetHDC(), GetHWND());
+    HBRUSH hbr = (HBRUSH)parent->MSWGetBgBrush(impl->GetHDC(), this);
 
     // if there is no special brush for painting this control, just use the
     // solid background colour
@@ -537,14 +538,16 @@ void wxStaticBox::OnPaint(wxPaintEvent& WXUNUSED(event))
     dc.Blit(border, 0, rc.right - border, borderTop,
             &memdc, border, 0);
     // bottom
-    dc.Blit(border, rc.bottom - border, rc.right - border, rc.bottom,
+    dc.Blit(border, rc.bottom - border, rc.right - border, border,
             &memdc, border, rc.bottom - border);
     // left
     dc.Blit(0, 0, border, rc.bottom,
             &memdc, 0, 0);
-    // right
-    dc.Blit(rc.right - border, 0, rc.right, rc.bottom,
-            &memdc, rc.right - border, 0);
+    // right (note that upper and bottom right corners were already part of the
+    // first two blits so we shouldn't overwrite them here to avoi flicker)
+    dc.Blit(rc.right - border, borderTop,
+            border, rc.bottom - borderTop - border,
+            &memdc, rc.right - border, borderTop);
 
 
     // create the region excluding box children