From 4589d14838d983d133d1ad986aa2d80f2be5fda0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 15 Sep 2008 13:33:35 +0000 Subject: [PATCH] WinCE compilation fix: don't use FNERR_INVALIDFILENAME git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@55642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/filedlg.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index c5725389f0..e42c974506 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -438,7 +438,13 @@ int wxFileDialog::ShowModal() DWORD errCode; bool success = DoShowCommFileDialog(&of, m_windowStyle, &errCode); - if ( !success && errCode == FNERR_INVALIDFILENAME && of.lpstrFile[0] ) + if ( !success && + // FNERR_INVALIDFILENAME is not defined under CE (besides we don't + // use CommDlgExtendedError() there anyhow) +#ifndef __WXWINCE__ + errCode == FNERR_INVALIDFILENAME && +#endif // !__WXWINCE__ + of.lpstrFile[0] ) { // this can happen if the default file name is invalid, try without it now of.lpstrFile[0] = _T('\0');