call SetHWND(hWnd) from SubclassWin(), this is consistent with calling SetHWND(0) from UnsubclassWin()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-03-05 15:16:50 +00:00
parent a575238f87
commit e322e3b6cc

View 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);
}