Click to See Complete Forum and Search --> : Any suggestion
Sophie
April 18th, 1999, 08:51 PM
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();
}
Masaaki
April 18th, 1999, 11:08 PM
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-
sally
April 19th, 1999, 04:00 AM
// 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();
}
}
}
Sally
April 19th, 1999, 04:00 AM
// 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();
}
}
}
Oak
April 19th, 1999, 04:57 AM
else{
***suggestion on what to do here**
return;
}
WBR Oak
Sophie
April 19th, 1999, 08:29 AM
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
Masaaki
April 19th, 1999, 10:54 AM
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-
sally
April 19th, 1999, 06:28 PM
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
Sally
April 19th, 1999, 06:28 PM
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
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.