diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index 7ec54aecf3..0bc3273b38 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -293,7 +293,7 @@ int wxFileDialog::ShowModal() } of.lpstrFilter = (LPTSTR)(const wxChar *)filterBuffer; - of.nFilterIndex = m_filterIndex; + of.nFilterIndex = m_filterIndex + 1; //=== Setting defaultFileName >>========================================= @@ -354,7 +354,7 @@ int wxFileDialog::ShowModal() //=== Adding the correct extension >>================================= - m_filterIndex = (int)of.nFilterIndex; + m_filterIndex = (int)of.nFilterIndex - 1; if ( of.nFileExtension && fileNameBuffer[ of.nFileExtension-1] != wxT('.') ) { // user has typed an filename