git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57389
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if (dialog.ShowModal() == wxID_OK)
{
wxString info;
if (dialog.ShowModal() == wxID_OK)
{
wxString info;
- MyExtraPanel *extra_panel
- = static_cast<MyExtraPanel*>(dialog.GetExtraControl());
+ wxWindow * const extra = dialog.GetExtraControl();
info.Printf(_T("Full file name: %s\n")
_T("Path: %s\n")
_T("Name: %s\n")
info.Printf(_T("Full file name: %s\n")
_T("Path: %s\n")
_T("Name: %s\n")
dialog.GetPath().c_str(),
dialog.GetDirectory().c_str(),
dialog.GetFilename().c_str(),
dialog.GetPath().c_str(),
dialog.GetDirectory().c_str(),
dialog.GetFilename().c_str(),
- extra_panel->GetInfo().c_str());
+ extra ? static_cast<MyExtraPanel*>(extra)->GetInfo()
+ : wxString("None"));
wxMessageDialog dialog2(this, info, _T("Selected file"));
dialog2.ShowModal();
}
wxMessageDialog dialog2(this, info, _T("Selected file"));
dialog2.ShowModal();
}