X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eed04c9999d7929fad7d18fab4e8071b515f6aa7..1a86d2e52c76551a8067403bc08d82bee0186d2c:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 2fb78f4a7c..3702df9b6c 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -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);