]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/filedlg.cpp
*** empty log message ***
[wxWidgets.git] / src / msw / filedlg.cpp
index f2b7231c4db84e8095fef9ef9f328e43d0135bcc..f6e81b32fecd79708ab910b134bb84b5a29ec544 100644 (file)
@@ -341,9 +341,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;
 
 }