/////////////////////////////////////////////////////////////////////////////
// Name: src/msw/wince/filedlgwce.cpp
-// Purpose: wxFileDialog for WinCE (SmartPhone)
+// Purpose: wxFileDialog implementation for smart phones driven by WinCE
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "filedlg.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// Only use this for MS SmartPhone. Use standard file dialog
// for Pocket PC.
-#if wxUSE_FILEDLG && wxUSE_SMARTPHONE
+#if wxUSE_FILEDLG && defined(__SMARTPHONE__) && defined(__WXWINCE__)
#ifndef WX_PRECOMP
#include "wx/utils.h"
wxWindow* parentWindow = GetParent();
if (!parentWindow)
parentWindow = wxTheApp->GetTopWindow();
-
+
wxString str = wxGetTextFromUser(m_message, _("File"), m_fileName, parentWindow);
- if (str)
- {
- m_fileName = str;
- m_fileNames.Add(str);
- return wxID_OK;
- }
- else
- {
+ if (str.empty())
return wxID_CANCEL;
- }
+
+ m_fileName = str;
+ m_fileNames.Add(str);
+ return wxID_OK;
}
-#endif // wxUSE_FILEDLG
+void wxFileDialog::GetFilenames(wxArrayString& files) const
+{
+ files = m_fileNames;
+}
+#endif // wxUSE_FILEDLG && __SMARTPHONE__ && __WXWINCE__