Program dialog with a CButton with VC++6.0 MFC in WinXP causes ass

G

Guest

I program a single document application with VC++6.0 MFC in WinXP pro.
And I create a dialog (inherate from CDialog) with a button (inherate from
CButton)
instantiated as m_btn. The dialog works as model mode: for example:

void CView::OnOpenDlg()
{
CMyDlg dlg(this);
dlg.DoModal();
}

No matter either 'ok' or 'cancel' is clicked, when the dialog disappeared, a
debug ASSERT dialog box will popup and shows the below error information:
Debug Assertion Failed!
Program: d:\myapp.exe
File: wincore.cpp
Line:980
....
I open the wincore.cpp, the below code causes the assertion:
ASSERT(pMap->LookupPermanent(hWndOrig) == NULL);

I compile and run the application in win2000 pro, no assertion occurs.
I am not sure whether it is a bug of VC++6.0. How can I fix it in winXP pro?
 
J

Jon

"Use ACCESS driver on Win NT4.0"
I program a single document application with VC++6.0 MFC in WinXP pro.
And I create a dialog (inherate from CDialog) with a button (inherate from
CButton)
instantiated as m_btn. The dialog works as model mode: for example:

void CView::OnOpenDlg()
{
CMyDlg dlg(this);
dlg.DoModal();
}

No matter either 'ok' or 'cancel' is clicked, when the dialog disappeared,
a
debug ASSERT dialog box will popup and shows the below error information:
Debug Assertion Failed!
Program: d:\myapp.exe
File: wincore.cpp
Line:980
...
I open the wincore.cpp, the below code causes the assertion:
ASSERT(pMap->LookupPermanent(hWndOrig) == NULL);

I compile and run the application in win2000 pro, no assertion occurs.
I am not sure whether it is a bug of VC++6.0. How can I fix it in winXP
pro?

Build it as a 'release' rather than a 'debug'

Jon
 
G

Guest

Jon said:
"Use ACCESS driver on Win NT4.0"


Build it as a 'release' rather than a 'debug'

Jon

Thanks,
Of course the error disappeared when the application is complied as release
version. But the debug version is more important to me. I need it to debug my
application, and I dont like to see the assertion dialog box always popups
during
debugging. And my customer also will not accept the code that will cause
assertion
even in debug version.

I want to know why is work ok in window2000 pro.
 
Top