X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/026ff75b753dc53088b1ed7b58227945d93d78c5..e6a8416274252fb6ea33800cfce0e4ba0a0542f1:/src/msw/filedlg.cpp?ds=sidebyside diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index ef9fd75fd8..175b241358 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -276,13 +276,7 @@ int wxFileDialog::ShowModal() *fileNameBuffer = wxT('\0'); *titleBuffer = wxT('\0'); -#if WXWIN_COMPATIBILITY_2_4 - long msw_flags = 0; - if ( HasFdFlag(wxHIDE_READONLY) || HasFdFlag(wxFD_SAVE) ) - msw_flags |= OFN_HIDEREADONLY; -#else long msw_flags = OFN_HIDEREADONLY; -#endif if ( HasFdFlag(wxFD_FILE_MUST_EXIST) ) msw_flags |= OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; @@ -326,7 +320,7 @@ int wxFileDialog::ShowModal() of.lStructSize = gs_ofStructSize; of.hwndOwner = hWnd; - of.lpstrTitle = WXSTRINGCAST m_message; + of.lpstrTitle = m_message.wx_str(); of.lpstrFileTitle = titleBuffer; of.nMaxFileTitle = wxMAXFILE + 1 + wxMAXEXT; @@ -397,12 +391,12 @@ int wxFileDialog::ShowModal() } } - of.lpstrFilter = (LPTSTR)filterBuffer.c_str(); + of.lpstrFilter = (LPTSTR)filterBuffer.wx_str(); of.nFilterIndex = m_filterIndex + 1; //=== Setting defaultFileName >>========================================= - wxStrncpy( fileNameBuffer, (const wxChar *)m_fileName, wxMAXPATH-1 ); + wxStrncpy(fileNameBuffer, m_fileName, wxMAXPATH-1); fileNameBuffer[ wxMAXPATH-1 ] = wxT('\0'); of.lpstrFile = fileNameBuffer; // holds returned filename @@ -415,7 +409,7 @@ int wxFileDialog::ShowModal() wxString defextBuffer; // we need it to be alive until GetSaveFileName()! if (HasFdFlag(wxFD_SAVE)) { - const wxChar* extension = filterBuffer; + const wxChar* extension = filterBuffer.wx_str(); int maxFilter = (int)(of.nFilterIndex*2L) - 1; for( int i = 0; i < maxFilter; i++ ) // get extension @@ -517,7 +511,7 @@ int wxFileDialog::ShowModal() (of.nFileExtension && fileNameBuffer[of.nFileExtension] == wxT('\0')) ) { // User has typed a filename without an extension: - const wxChar* extension = filterBuffer; + const wxChar* extension = filterBuffer.wx_str(); int maxFilter = (int)(of.nFilterIndex*2L) - 1; for( int i = 0; i < maxFilter; i++ ) // get extension