pls help me
-
hi i am calling a dialog function from another function as CMyConnCustomInstall *CustomDlg = new CMyConnCustomInstall; but it is getting crashed in debug state? why this occurs pls help me; my code is: f(pCustInst->GetCheck()) { CDialog::OnOK(); CMyConnCustomInstall *CustomDlg = new CMyConnCustomInstall; CustomDlg->DoModal(); }
-
hi i am calling a dialog function from another function as CMyConnCustomInstall *CustomDlg = new CMyConnCustomInstall; but it is getting crashed in debug state? why this occurs pls help me; my code is: f(pCustInst->GetCheck()) { CDialog::OnOK(); CMyConnCustomInstall *CustomDlg = new CMyConnCustomInstall; CustomDlg->DoModal(); }
-
Hi, I tested the same code without crash. After 'if', are there anymore statements? Thammadi
-
hi i am calling a dialog function from another function as CMyConnCustomInstall *CustomDlg = new CMyConnCustomInstall; but it is getting crashed in debug state? why this occurs pls help me; my code is: f(pCustInst->GetCheck()) { CDialog::OnOK(); CMyConnCustomInstall *CustomDlg = new CMyConnCustomInstall; CustomDlg->DoModal(); }
What happens if you run
CustomDlg->Create();
CustomDlg->ShowWindow(1);
WhiteSky
-
hi i am calling a dialog function from another function as CMyConnCustomInstall *CustomDlg = new CMyConnCustomInstall; but it is getting crashed in debug state? why this occurs pls help me; my code is: f(pCustInst->GetCheck()) { CDialog::OnOK(); CMyConnCustomInstall *CustomDlg = new CMyConnCustomInstall; CustomDlg->DoModal(); }
-
Is the line where you call CDialog::OnOK() inside a member function of the CDialog? Regards Leo
Let's accallerate this, so that I do not need to wait for your reply. Also I'm not sure, if my question was clear. I suppose you are doing something like
DialogA::OnUpdateUI()
{
CDialog::OnOK();
pDialogB = new Dialog B;
...
}Since OnOK() of the base clase does the same like hitting the OK button I guess that DialogA is destroyed. If this is true than at the next line you try to execute code in a non existent object. Maybe
DialogA::OnUpdateUI()
{
DialogA.ShowWindow(FALSE);
pDialogB = new Dialog B;
...
CDialog::OnOK();
}works? Regards Leo
-
Is the line where you call CDialog::OnOK() inside a member function of the CDialog? Regards Leo
-
hi i am calling a dialog function from another function as CMyConnCustomInstall *CustomDlg = new CMyConnCustomInstall; but it is getting crashed in debug state? why this occurs pls help me; my code is: f(pCustInst->GetCheck()) { CDialog::OnOK(); CMyConnCustomInstall *CustomDlg = new CMyConnCustomInstall; CustomDlg->DoModal(); }
saisp wrote:
...but it is getting crashed in debug state?
Are we supposed to guess where? :rolleyes:
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne