]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
distinguish between Server 2003 and XP 64-bit (closes 3359)
[wxWidgets.git] / src / msw / window.cpp
index 2fb78f4a7c4f36315c0beefb7c5a1846afcf74be..3702df9b6cc9fa51db08ac1fa0391f90caa0c76c 100644 (file)
@@ -3669,6 +3669,12 @@ bool wxWindowMSW::MSWCreate(const wxChar *wclass,
                             WXDWORD style,
                             WXDWORD extendedStyle)
 {
+    // check a common bug in the user code: if the window is created with a
+    // non-default ctor and Create() is called too, we'd create 2 HWND for a
+    // single wxWindow object and this results in all sorts of trouble,
+    // especially for wxTLWs
+    wxCHECK_MSG( !m_hWnd, true, "window can't be recreated" );
+
     // choose the position/size for the new window
     int x, y, w, h;
     (void)MSWGetCreateWindowCoords(pos, size, x, y, w, h);