Fixed native dialog bug

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-06-05 10:57:59 +00:00
parent 31eefb998d
commit f032bf3d16
2 changed files with 14 additions and 6 deletions

View File

@@ -95,11 +95,6 @@ void MyFrame::OnTest1(wxCommandEvent& event)
MyDialog *dialog = new MyDialog;
if (dialog->LoadNativeDialog(this, _T("dialog1")))
{
/*
wxTextCtrl *text = (wxTextCtrl *)wxFindWindowByName("multitext3", dialog);
if (text)
text->SetValue("wxWindows resource demo");
*/
dialog->SetModal(TRUE);
dialog->ShowModal();
}

View File

@@ -108,7 +108,20 @@ bool wxWindow::LoadNativeDialog(wxWindow* parent, const wxString& name)
else
wxTopLevelWindows.Append(this);
// FIXME why don't we enum all children here?
// Enumerate all children
HWND hWndNext;
hWndNext = ::GetWindow((HWND) m_hWnd, GW_CHILD);
wxWindow* child = NULL;
if (hWndNext)
child = CreateWindowFromHWND(this, (WXHWND) hWndNext);
while (hWndNext != (HWND) NULL)
{
hWndNext = ::GetWindow(hWndNext, GW_HWNDNEXT);
if (hWndNext)
child = CreateWindowFromHWND(this, (WXHWND) hWndNext);
}
return TRUE;
}