-
Any suggestion
Any suggestion on how to not continue if the ID is equal to IDNO?
Thank you
void CDlgQuestionPath::OnOK()
{
UpdateData(TRUE); //Will update all existing variables.
CString destPath = GetQuesPath();
Path path(ToString(destPath));
if (!path.IsDirect()){
int iResponse = AfxMessageBox(IDS_WARN_NODIRECTORYEXIST, MB_YESNO|MB_ICONQUESTION);
if(iResponse == IDYES) {
Directory dir(ToString(destPath));
dir.Create();
}
else{
***suggestion on what to do here**
}
}
CDialog::OnOK();
}
-
Re: Any suggestion
Hi, Sophie.
As for me, if I use YesNo MessageBox,
I remove all input which it get by Yes button and set focus to
some edit box when I click No button.
Regards.
-Masaaki Onishi-
-
Re: Any suggestion
// This is my suggestion
void CDlgQuestionPath::OnOK()
{
UpdateData(TRUE); //Will update all existing variables.
CString destPath = GetQuesPath();
Path path(ToString(destPath));
if (!path.IsDirect()){
int iResponse = AfxMessageBox(IDS_WARN_NODIRECTORYEXIST, MB_YESNO|MB_ICONQUESTION);
if(iResponse == IDYES) {
Directory dir(ToString(destPath));
dir.Create();
CDialog::OnOK();
}
}
}
-
Re: Any suggestion
else{
***suggestion on what to do here**
return;
}
WBR Oak
-
Re: Any suggestion
Good suggestion. But now if I try to use a directory that already exist it doesn't work. It only works when it is a new directory.
Any other suggestion!
Thanks
-
Re: Any suggestion
Hi, Sophie.
My previous post seems to be out of scope?
When you use YesNo message box, you should show something.
In this case, you must show the directory name and location.
Otherwise, this messagebox makes no sense.
HTH.
-Masaaki Onishi-
-
Re: Any suggestion
can you give me a bit more detail of what the program at large is doing
and also what you plan to do with the existing directory and how you do that?
Sally