* File selector
*/
-WXDLLEXPORT_DATA(extern const char*) wxFileSelectorPromptStr;
-WXDLLEXPORT_DATA(extern const char*) wxFileSelectorDefaultWildcardStr;
-
class WXDLLEXPORT wxFileDialog: public wxDialog
{
DECLARE_DYNAMIC_CLASS(wxFileDialog)
void GetPaths(wxArrayString& rasPath) const;
inline wxString GetDirectory(void) const { return m_sDir; }
inline wxString GetFilename(void) const { return m_sFileName; }
- inline void GetFilenames(wxArrayString& rasFilenames) { rasFilenames.Empty(); rasFilenames.Add( m_sFileName); }
+ inline void GetFilenames(wxArrayString& rasFilenames) { rasFilenames = m_asFileNames; }
inline wxString GetWildcard(void) const { return m_sWildCard; }
inline long GetStyle(void) const { return m_lDialogStyle; }
inline int GetFilterIndex() const { return m_nFilterIndex ; }
if (sDir.IsEmpty())
sDir = "*.*";
wxStrcpy(vFileDlg.szFullFile, sDir.c_str());
+ sFilterBuffer = sDir;
hWnd = ::WinFileDlg( HWND_DESKTOP
,GetHwndOf(m_pParent)
wxStrcpy(zFileNameBuffer, vFileDlg.szFullFile);
int nIdx = wxStrlen(zFileNameBuffer) - 1;
+ wxString sExt;
- if (zFileNameBuffer[nIdx] == wxT('.') )
+ wxSplitPath( zFileNameBuffer
+ ,&m_sPath
+ ,&m_sFileName
+ ,&sExt
+ );
+ if (zFileNameBuffer[nIdx] == wxT('.') || sExt.IsEmpty())
{
zFileNameBuffer[nIdx] = wxT('\0');