|
-
April 18th, 1999, 08:51 PM
#1
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();
}
-
April 18th, 1999, 11:08 PM
#2
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-
-
April 19th, 1999, 04:00 AM
#3
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();
}
}
}
-
April 19th, 1999, 04:57 AM
#4
Re: Any suggestion
else{
***suggestion on what to do here**
return;
}
WBR Oak
-
April 19th, 1999, 08:29 AM
#5
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
-
April 19th, 1999, 10:54 AM
#6
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-
-
April 19th, 1999, 06:28 PM
#7
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|