diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-25 03:20:56 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-25 03:20:56 (GMT) |
commit | 538d6e82d8879b31edbd7b4dbd73f6f856b081dd (patch) | |
tree | 46eb9ce730494fcc009aef70509d24681eec1868 /Source/MFCDialog | |
parent | e2e08e4b96532761ae77947c3f7fa366d4952b72 (diff) | |
download | CMake-538d6e82d8879b31edbd7b4dbd73f6f856b081dd.zip CMake-538d6e82d8879b31edbd7b4dbd73f6f856b081dd.tar.gz CMake-538d6e82d8879b31edbd7b4dbd73f6f856b081dd.tar.bz2 |
ENH: do not force users to create paths
Diffstat (limited to 'Source/MFCDialog')
-rw-r--r-- | Source/MFCDialog/PathDialog.cpp | 25 |
1 files 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) |