fixed wrong return value and child creation login in GetWindowChild() (includes patch 1506083)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -146,20 +146,14 @@ wxWindow* wxWindow::GetWindowChild(wxWindowID id)
|
||||
wxWindow* win = GetWindowChild1(id);
|
||||
if ( !win )
|
||||
{
|
||||
HWND hWnd = ::GetDlgItem((HWND) GetHWND(), id);
|
||||
|
||||
if (hWnd)
|
||||
HWND hwnd = ::GetDlgItem(GetHwnd(), id);
|
||||
if ( hwnd )
|
||||
{
|
||||
wxWindow* child = CreateWindowFromHWND(this, (WXHWND) hWnd);
|
||||
if (child)
|
||||
{
|
||||
child->AddChild(this);
|
||||
return child;
|
||||
}
|
||||
win = CreateWindowFromHWND(this, (WXHWND) hwnd);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return win;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user