diff --git a/docs/changes.txt b/docs/changes.txt index 23e8f5977a..ce842d7764 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -133,12 +133,13 @@ wxMSW: wxWidgets 2.8.9 or later. - Fix keyboard support in wxSpinCtrl broken in 2.8.8. - Compile fix for WinCE in window.cpp (no VkKeyScan in Windows CE). -- Fix quoting of arguments passed to wxExecute(char **) (Brian Ravnsgaard Riis). - Support disabling items before adding them to the menu (Christian Walther). - Allow to call SetFont(wxNullFont) to reset the font to default. - Implement UUID::operator==() and !=() (SQLAware Corporation). - Fixed long standing (introduced in 2.6.3) bug which resulted in always creating a DIB and not DDB in wxBitmap(const wxImage&) ctor. +- Fix the bug with wxFileDialog not being shown at all if the default file name + was invalid. wxGTK: diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index ef9fd75fd8..c5725389f0 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -438,6 +438,13 @@ int wxFileDialog::ShowModal() DWORD errCode; bool success = DoShowCommFileDialog(&of, m_windowStyle, &errCode); + if ( !success && errCode == FNERR_INVALIDFILENAME && of.lpstrFile[0] ) + { + // this can happen if the default file name is invalid, try without it now + of.lpstrFile[0] = _T('\0'); + success = DoShowCommFileDialog(&of, m_windowStyle, &errCode); + } + #ifdef wxTRY_SMALLER_OPENFILENAME // the system might be too old to support the new version file dialog // boxes, try with the old size