IMPLEMENT_CLASS(wxFileDialog, wxFileDialogBase)
// ----------------------------------------------------------------------------
IMPLEMENT_CLASS(wxFileDialog, wxFileDialogBase)
// ----------------------------------------------------------------------------
- if ((m_dialogStyle & wxHIDE_READONLY) || (m_dialogStyle & wxSAVE))
+#if WXWIN_COMPATIBILITY_2_4
+ if (m_dialogStyle & wxHIDE_READONLY)
+ lFlags |= FDS_SAVEAS_DIALOG;
+#endif
+
+ if (m_dialogStyle & wxSAVE)
lFlags |= FDS_SAVEAS_DIALOG;
if (m_dialogStyle & wxMULTIPLE )
lFlags |= FDS_OPEN_DIALOG | FDS_MULTIPLESEL;
vFileDlg.cbSize = sizeof(FILEDLG);
vFileDlg.fl = lFlags;
lFlags |= FDS_SAVEAS_DIALOG;
if (m_dialogStyle & wxMULTIPLE )
lFlags |= FDS_OPEN_DIALOG | FDS_MULTIPLESEL;
vFileDlg.cbSize = sizeof(FILEDLG);
vFileDlg.fl = lFlags;
- m_dir = wxPathOnly(wxString((const char*)*vFileDlg.papszFQFilename[0]));
- m_path = (const char*)*vFileDlg.papszFQFilename[0];
+ m_dir = wxPathOnly(wxString((const wxChar*)*vFileDlg.papszFQFilename[0]));
+ m_path = (const wxChar*)*vFileDlg.papszFQFilename[0];
m_fileNames.Add(m_fileName);
}
::WinFreeFileDlgList(vFileDlg.papszFQFilename);
}
else if (!(m_dialogStyle & wxSAVE))
{
m_fileNames.Add(m_fileName);
}
::WinFreeFileDlgList(vFileDlg.papszFQFilename);
}
else if (!(m_dialogStyle & wxSAVE))
{
- m_path = vFileDlg.szFullFile;
- m_fileName = wxFileNameFromPath(vFileDlg.szFullFile);
- m_dir = wxPathOnly(vFileDlg.szFullFile);
+ m_path = (wxChar*)vFileDlg.szFullFile;
+ m_fileName = wxFileNameFromPath(wxString((const wxChar*)vFileDlg.szFullFile));
+ m_dir = wxPathOnly((const wxChar*)vFileDlg.szFullFile);
- m_fileName = wxFileNameFromPath(vFileDlg.szFullFile);
- m_dir = wxPathOnly(vFileDlg.szFullFile);
+ m_fileName = wxFileNameFromPath((const wxChar*)vFileDlg.szFullFile);
+ m_dir = wxPathOnly((const wxChar*)vFileDlg.szFullFile);