]> git.saurik.com Git - wxWidgets.git/commitdiff
call SetHWND(hWnd) from SubclassWin(), this is consistent with calling SetHWND(0...
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 5 Mar 2008 15:16:50 +0000 (15:16 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 5 Mar 2008 15:16:50 +0000 (15:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index 3efc43f1e9d193c068251eec599afd9c6fa152da..8f009f6ffacaabe4a45a108dd4a3d5c9af62fee1 100644 (file)
@@ -1193,6 +1193,8 @@ void wxWindowMSW::SubclassWin(WXHWND hWnd)
     HWND hwnd = (HWND)hWnd;
     wxCHECK_RET( ::IsWindow(hwnd), wxT("invalid HWND in SubclassWin") );
 
+    SetHWND(hWnd);
+
     wxAssociateWinWithHandle(hwnd, this);
 
     m_oldWndProc = (WXFARPROC)wxGetWindowProc((HWND)hWnd);
@@ -1251,7 +1253,7 @@ void wxWindowMSW::AssociateHandle(WXWidget handle)
 
     WXHWND wxhwnd = (WXHWND)handle;
 
-    SetHWND(wxhwnd);
+    // this also calls SetHWND(wxhwnd)
     SubclassWin(wxhwnd);
 }