Ok here goes,
I have a dialog that when I select a button it creates another dialog, like this:
void CMRDlg::OnBnClickedCreatedatabase()
{
DBNameDlg NewDB;
NewDB.DoModal();
return;
}
In the NewDB Dialog when I clicked the submit button I want to call the CreateDatabase Function that is part of the original dialog, I have been trying to get this for a while and I have failed everytime.
This is as far as I have gotten:
void DBNameDlg::OnBnClickedCreatedb()
{
sDBName.GetWindowText(NewDBName);
CMRDlg old = this->GetParent();
old.CreateDatabase(NewDBName);
this->DestroyWindow();
}
Please tell me how to pass this variable page to the function =)
Any help is much obliged..
-Ron
/**************
Me: When will the project be finished?
Them: What project?
Me: The one you have been working on for the last 3 years!
Them: Ohh, we can't finish it?
Me: Why?
Them: We don't know how to program...
I have a dialog that when I select a button it creates another dialog, like this:
void CMRDlg::OnBnClickedCreatedatabase()
{
DBNameDlg NewDB;
NewDB.DoModal();
return;
}
In the NewDB Dialog when I clicked the submit button I want to call the CreateDatabase Function that is part of the original dialog, I have been trying to get this for a while and I have failed everytime.
This is as far as I have gotten:
void DBNameDlg::OnBnClickedCreatedb()
{
sDBName.GetWindowText(NewDBName);
CMRDlg old = this->GetParent();
old.CreateDatabase(NewDBName);
this->DestroyWindow();
}
Please tell me how to pass this variable page to the function =)
Any help is much obliged..
-Ron
/**************
Me: When will the project be finished?
Them: What project?
Me: The one you have been working on for the last 3 years!
Them: Ohh, we can't finish it?
Me: Why?
Them: We don't know how to program...