]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
Change in wxWindow the access specifier of the wxEvtHandler event processing and...
[wxWidgets.git] / src / msw / window.cpp
index ea0ffb19acf8b3864f18f12261df190de08777a0..e808841ca4c65c18321b1e8aece1aca63b4e0684 100644 (file)
@@ -518,7 +518,6 @@ bool wxWindowMSW::MSWCommand(WXUINT WXUNUSED(param), WXWORD WXUNUSED(id))
 void wxWindowMSW::Init()
 {
     // MSW specific
-    m_isBeingDeleted = false;
     m_oldWndProc = NULL;
     m_mouseInWindow = false;
     m_lastKeydownProcessed = false;
@@ -540,7 +539,7 @@ void wxWindowMSW::Init()
 // Destructor
 wxWindowMSW::~wxWindowMSW()
 {
-    m_isBeingDeleted = true;
+    SendDestroyEvent();
 
 #ifndef __WXUNIVERSAL__
     // VS: make sure there's no wxFrame with last focus set to us:
@@ -3949,8 +3948,6 @@ bool wxWindowMSW::HandleCreate(WXLPCREATESTRUCT WXUNUSED_IN_WINCE(cs),
 
 bool wxWindowMSW::HandleDestroy()
 {
-    SendDestroyEvent();
-
     // delete our drop target if we've got one
 #if wxUSE_DRAG_AND_DROP
     if ( m_dropTarget != NULL )
@@ -4725,6 +4722,14 @@ bool wxWindowMSW::HandleEraseBkgnd(WXHDC hdc)
 
 void wxWindowMSW::OnEraseBackground(wxEraseEvent& event)
 {
+    if ( GetBackgroundStyle() == wxBG_STYLE_CUSTOM )
+    {
+        // don't skip the event here, custom background means that the app
+        // is drawing it itself in its OnPaint(), so don't draw it at all
+        // now to avoid flicker
+        return;
+    }
+
     // standard non top level controls (i.e. except the dialogs) always erase
     // their background themselves in HandleCtlColor() or have some control-
     // specific ways to set the colours (common controls)
@@ -4734,14 +4739,6 @@ void wxWindowMSW::OnEraseBackground(wxEraseEvent& event)
         return;
     }
 
-    if ( GetBackgroundStyle() == wxBG_STYLE_CUSTOM )
-    {
-        // don't skip the event here, custom background means that the app
-        // is drawing it itself in its OnPaint(), so don't draw it at all
-        // now to avoid flicker
-        return;
-    }
-
     wxDC *dc = event.GetDC();
     if (!dc) return;
     wxMSWDCImpl *impl = (wxMSWDCImpl*) dc->GetImpl();