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);
|
wxWindow* win = GetWindowChild1(id);
|
||||||
if ( !win )
|
if ( !win )
|
||||||
{
|
{
|
||||||
HWND hWnd = ::GetDlgItem((HWND) GetHWND(), id);
|
HWND hwnd = ::GetDlgItem(GetHwnd(), id);
|
||||||
|
if ( hwnd )
|
||||||
if (hWnd)
|
|
||||||
{
|
{
|
||||||
wxWindow* child = CreateWindowFromHWND(this, (WXHWND) hWnd);
|
win = CreateWindowFromHWND(this, (WXHWND) hwnd);
|
||||||
if (child)
|
|
||||||
{
|
|
||||||
child->AddChild(this);
|
|
||||||
return child;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return win;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user