]> git.saurik.com Git - wxWidgets.git/commitdiff
send wxWindowCreateEvent from SubclassWin(), not WM_CREATE handler as we don't get...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 6 May 2006 22:34:24 +0000 (22:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 6 May 2006 22:34:24 +0000 (22:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index b7d47b4a7c0d9885757daef9341157a7b9906db4..a4e435e41141f9936a78c3c6dea0e9a7b5166b0c 100644 (file)
@@ -1042,6 +1042,10 @@ void wxWindowMSW::SubclassWin(WXHWND hWnd)
         // simply check m_oldWndProc
         m_oldWndProc = NULL;
     }
+
+    // we're officially created now, send the event
+    wxWindowCreateEvent event((wxWindow *)this);
+    (void)GetEventHandler()->ProcessEvent(event);
 }
 
 void wxWindowMSW::UnsubclassWin()
@@ -3501,10 +3505,6 @@ bool wxWindowMSW::HandleCreate(WXLPCREATESTRUCT WXUNUSED_IN_WINCE(cs),
         EnsureParentHasControlParentStyle(GetParent());
 #endif // !__WXWINCE__
 
-    // TODO: should generate this event from WM_NCCREATE
-    wxWindowCreateEvent event((wxWindow *)this);
-    (void)GetEventHandler()->ProcessEvent(event);
-
     *mayCreate = true;
 
     return true;