From: Vadim Zeitlin Date: Sat, 6 May 2006 22:35:55 +0000 (+0000) Subject: use SubclassWin() insteaf of just wxAssociateWinWithHandle() to make sure we generate... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/05ae668ce491600cd568edbe15618693e63d619c use SubclassWin() insteaf of just wxAssociateWinWithHandle() to make sure we generate wxWindowCreateEvents for MDI frames (see patch 1411774) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 63d3949884..716f22007b 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -772,7 +772,13 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent, m_hWnd = (WXHWND)::SendMessage(GetWinHwnd(parent->GetClientWindow()), WM_MDICREATE, 0, (LONG)(LPSTR)&mcs); - wxAssociateWinWithHandle((HWND) GetHWND(), this); + if ( !m_hWnd ) + { + wxLogLastError(_T("WM_MDICREATE")); + return false; + } + + SubclassWin(m_hWnd); return true; }