but final cause unknown exception.
what cause exception?
thanks.
I am use window xp IDE codeblocks 8.02 and wxwidgets 2.8.10 msw
the code piece as follow:
Code: Select all
void test()
{
wxDialog dlg;
dlg.Create(NULL, wxNewId(), _T("Step 1"),
wxDefaultPosition, wxSize(500,300));
wxPanel* bgpanel=new wxPanel(&dlg, wxID_ANY, wxDefaultPosition, wxSize(dlg.GetSize().GetWidth(),dlg.GetSize().GetHeight()), wxTAB_TRAVERSAL|wxWANTS_CHARS, _T("Step 1"));
wxButton* ok = new wxButton(bgpanel,wxID_OK,_("ok"),wxPoint(bgpanel->GetSize().GetWidth()/2-50,bgpanel->GetSize().GetHeight()-60));
dlg.ShowModal();
dlg.Destroy();
wxDialog dlg2;
dlg2.Create(NULL, wxNewId(), _T("Step 2"),
wxDefaultPosition, wxSize(500,300));
wxPanel* bgpane2=new wxPanel(&dlg2, wxID_ANY, wxDefaultPosition, wxSize(dlg2.GetSize().GetWidth(),dlg2.GetSize().GetHeight()), wxTAB_TRAVERSAL|wxWANTS_CHARS, _T("step 1"));
wxButton* ok2 = new wxButton(bgpane2,wxID_OK,_("ok"),wxPoint(bgpane2->GetSize().GetWidth()/2-50,bgpane2->GetSize().GetHeight()-60));
dlg2.ShowModal();
dlg2.Destroy();
}