From 538d6e82d8879b31edbd7b4dbd73f6f856b081dd Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Tue, 24 Jan 2006 22:20:56 -0500 Subject: ENH: do not force users to create paths --- Source/MFCDialog/PathDialog.cpp | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/Source/MFCDialog/PathDialog.cpp b/Source/MFCDialog/PathDialog.cpp index d9e86a4..c397216 100644 --- a/Source/MFCDialog/PathDialog.cpp +++ b/Source/MFCDialog/PathDialog.cpp @@ -14,11 +14,11 @@ static char THIS_FILE[] = __FILE__; #endif -#define IDC_FOLDERTREE 0x3741 -#define IDC_TITLE 0x3742 -#define IDC_STATUSTEXT 0x3743 +#define IDC_FOLDERTREE 0x3741 +#define IDC_TITLE 0x3742 +#define IDC_STATUSTEXT 0x3743 -#define IDC_NEW_EDIT_PATH 0x3744 +#define IDC_NEW_EDIT_PATH 0x3744 // Class CDlgWnd BEGIN_MESSAGE_MAP(CPathDialogSub, CWnd) @@ -248,18 +248,15 @@ int CPathDialog::MakeSurePathExists(LPCTSTR lpPath) } strMsg.Format(c_FolderDoesNotExist, lpPath); - if(AfxMessageBox(strMsg, MB_YESNO|MB_ICONQUESTION) != IDYES) + if(AfxMessageBox(strMsg, MB_YESNO|MB_ICONQUESTION) == IDYES) { - return (int)-1; - } - - //create path - iRet=Touch(lpPath, FALSE); - if(iRet!=0) - { - throw iRet; + //create path + iRet=Touch(lpPath, FALSE); + if(iRet!=0) + { + throw iRet; + } } - return 0; } catch(int nErrCode) -- cgit v0.12