]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/toplevel.cpp
Fix crash when appending menuitem after removing it from another menu.
[wxWidgets.git] / src / msw / toplevel.cpp
index f7329fe3c07c5fc91bf8de4d015fbfe4032487f7..8378923a5c518bb405e3f7002534c8e0e24e12d6 100644 (file)
@@ -445,6 +445,13 @@ bool wxTopLevelWindowMSW::CreateDialog(const void *dlgTemplate,
     }
 #endif // !__WXWINCE__
 
+    if ( !title.empty() )
+    {
+        ::SetWindowText(GetHwnd(), title.wx_str());
+    }
+
+    SubclassWin(m_hWnd);
+
 #if !defined(__WXWINCE__) || defined(__WINCE_STANDARDSDK__)
     // move the dialog to its initial position without forcing repainting
     int x, y, w, h;
@@ -466,13 +473,6 @@ bool wxTopLevelWindowMSW::CreateDialog(const void *dlgTemplate,
     }
 #endif // !__WXWINCE__
 
-    if ( !title.empty() )
-    {
-        ::SetWindowText(GetHwnd(), title.wx_str());
-    }
-
-    SubclassWin(m_hWnd);
-
 #ifdef __SMARTPHONE__
     // Work around title non-display glitch
     Show(false);