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

Tech-Archive recommends: Speed Up your PC by fixing your registry




"Use ACCESS driver on Win NT4.0" <UseACCESSdriveronWinNT40@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:7B38A9D9-7A33-4118-B8C7-8C06982EE01F@xxxxxxxxxxxxxxxx
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

.


Quantcast