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:
@@ -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();
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user