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:
@@ -1193,6 +1193,8 @@ void wxWindowMSW::SubclassWin(WXHWND hWnd)
|
|||||||
HWND hwnd = (HWND)hWnd;
|
HWND hwnd = (HWND)hWnd;
|
||||||
wxCHECK_RET( ::IsWindow(hwnd), wxT("invalid HWND in SubclassWin") );
|
wxCHECK_RET( ::IsWindow(hwnd), wxT("invalid HWND in SubclassWin") );
|
||||||
|
|
||||||
|
SetHWND(hWnd);
|
||||||
|
|
||||||
wxAssociateWinWithHandle(hwnd, this);
|
wxAssociateWinWithHandle(hwnd, this);
|
||||||
|
|
||||||
m_oldWndProc = (WXFARPROC)wxGetWindowProc((HWND)hWnd);
|
m_oldWndProc = (WXFARPROC)wxGetWindowProc((HWND)hWnd);
|
||||||
@@ -1251,7 +1253,7 @@ void wxWindowMSW::AssociateHandle(WXWidget handle)
|
|||||||
|
|
||||||
WXHWND wxhwnd = (WXHWND)handle;
|
WXHWND wxhwnd = (WXHWND)handle;
|
||||||
|
|
||||||
SetHWND(wxhwnd);
|
// this also calls SetHWND(wxhwnd)
|
||||||
SubclassWin(wxhwnd);
|
SubclassWin(wxhwnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user