From 3c5ab89b18854aac3e92f703d6adeb4df57deb79 Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Tue, 2 Dec 2008 22:53:38 +0000 Subject: [PATCH] fix background repainting under wxMSW (not sure this is the best way to do it - but it works) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/image/image.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/samples/image/image.cpp b/samples/image/image.cpp index 8e97c619a8..14c1c82d47 100644 --- a/samples/image/image.cpp +++ b/samples/image/image.cpp @@ -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, -- 2.45.2