"Debug Assertion Failure"
At first, I only created CMy123Dlg dialog box, but later i decided to add others dialog box.
there are 3 dialog boxes that i had created,
1)CMenuDlg
2)CMonitorDlg
3)CSynrinceDlg
CMenuDlg have 3 buttons which are BInfusion, BMonitor, BSynrince
what i want my appication run are:
1) the CMenuDlg load first
i)if i click the BInfusion, it will go to the CMy123Dlg
ii) if i click the BMonitor button , it will go ot the CMonitorDlg
iii)if i click the Bsyrince it will go to the CSynrinceDlg
Here is my code:
BOOL CMy123App :: InitInstance()
{
CMenuDlg firstDlg;
firstDlg.DoModal();
return FALSE;
}
////then i do the same at other buttons on the CMenuDlg:
void CMenuDlg::OnInfusion()
{
// TODO: Add your control notification handler code here
CMy123Dlg DlgMy123;
DlgMy123.DoModal();
}
void CMenuDlg::OnMonitor()
{
// TODO: Add your control notification handler code here
CMonitorDlg DlgMonitor;
DlgMonitor.DoModal();
}
void CMenuDlg::OnSyringe()
{
// TODO: Add your control notification handler code here
m_dSyringDlg.DoModal();
}
my application is working but it will "Debug assertion failed,"when i execute it. However if i clicked on the ignore button it will run my program. i knew thw error is that after i had added code in the CMenuDlg::OnInfusion(); it will prompt me the "debug Assertion failure" dialog box when i execute it, but i don't know how to solve it.
this is the error file :
File: afxwin1.inl
Line:22
im new to Visual C++, i need your help.
Whats wrong with my code.... how do i clear the "debug assertion failure" dialog box? ???could you help me please??
thank you very much..
|