X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/837e57436a89516a5fa9f478f401e06bd872c17c..24bd64eec17776d9f3ad4cabcd13697e56f568d1:/src/msw/filedlg.cpp diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index f2b7231c4d..79c17ba865 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -28,6 +28,7 @@ #include "wx/dialog.h" #include "wx/filedlg.h" #include "wx/intl.h" + #include "wx/log.h" #endif #include @@ -341,9 +342,23 @@ int wxFileDialog::ShowModal(void) } } - } // 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; }