#include "wx/dialog.h"
#include "wx/filedlg.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include <windows.h>
m_path = fileNameBuffer;
m_fileName = wxFileNameFromPath(fileNameBuffer);
+ m_dir = wxPathOnly(fileNameBuffer);
//=== Simulating the wxOVERWRITE_PROMPT >>============================
}
}
- } // END: if ( success )
+ }
+ else
+ {
+ // common dialog failed - why?
+#ifdef __WXDEBUG__
+ DWORD dwErr = CommDlgExtendedError();
+ if ( dwErr != 0 )
+ {
+ // this msg is only for developers
+ wxLogError(_T("Common dialog failed with error code %0lx."),
+ dwErr);
+ }
+ //else: it was just cancelled
+#endif
+ }
- return (success ? wxID_OK : wxID_CANCEL) ;
+ return success ? wxID_OK : wxID_CANCEL;
}