Kelvin
May 6th, 1999, 04:57 AM
In MFC, i called m_dlgInstance.Invalidate before i destroy the current window by calling
CDialog::OnOK, this gives me a debug assertion failed message.
void CScsetting::OnOK()
{
// TODO: Add extra validation here
...............
...............
CAdminDlg m_admindlg;
if XXXX
{
m_admindlg.Invalidate();
CDialog::OnOK //Debug Assertion Failed here!!!!!!!!!!!
}
else
{
.........
CDialog::OnOK;
}
}
I must do a Invalidate() to force the main window which is in CAdminDlg to repaint when the current
dialog box destroyed. But then i faced a debug assertion failed if i do a Invalidate for the main window before
i call CDialog::OnOK.
anybody can help me??
CDialog::OnOK, this gives me a debug assertion failed message.
void CScsetting::OnOK()
{
// TODO: Add extra validation here
...............
...............
CAdminDlg m_admindlg;
if XXXX
{
m_admindlg.Invalidate();
CDialog::OnOK //Debug Assertion Failed here!!!!!!!!!!!
}
else
{
.........
CDialog::OnOK;
}
}
I must do a Invalidate() to force the main window which is in CAdminDlg to repaint when the current
dialog box destroyed. But then i faced a debug assertion failed if i do a Invalidate for the main window before
i call CDialog::OnOK.
anybody can help me??