]> git.saurik.com Git - wxWidgets.git/commitdiff
fix background repainting under wxMSW (not sure this is the best way to do it - but...
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Tue, 2 Dec 2008 22:53:38 +0000 (22:53 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Tue, 2 Dec 2008 22:53:38 +0000 (22:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/image/image.cpp

index 8e97c619a897f17438116334d497be3aad1aeb29..14c1c82d476ef1a57edda5c99af15eeb5d4be236 100644 (file)
@@ -184,6 +184,8 @@ public:
         SetClientSize(bitmap.GetWidth(), bitmap.GetHeight());
 
         UpdateStatusBar();
+        
+        SetBackgroundColour(*wxWHITE);
     }
 
     void OnEraseBackground(wxEraseEvent& WXUNUSED(event))
@@ -194,6 +196,9 @@ public:
     void OnPaint(wxPaintEvent& WXUNUSED(event))
     {
         wxPaintDC dc(this);
+        
+        ClearBackground();
+        
         const wxSize size = GetClientSize();
         dc.DrawBitmap(m_bitmap,
                       (size.x - m_bitmap.GetWidth())/2,