Hi, I am a beginer in MFC. I used prof-UI just like below:
//in MainFrm.h
....
CExtControlBar m_wndSysStatusBar;
CExtWRB< CExtWFF<CStatusView > > m_wndInBarEdit;
//CStatusView is derived from CScrollView;
//in MainFram::OnCreate (...)
...
if(!m_wndSysStatusBar.Create(
_T("Bar"),
this,
ID_CTRL_SYSSTATUS
)
)
{
TRACE0("Failed to create m_wndSysStatusBar\n");
return -1; // fail to create
}
if( !m_wndInBarEdit.Create(NULL,
NULL,
WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_HSCROLL|ES_MULTILINE|ES_LEFT,
CRect(0,0,0,0),
&m_wndSysStatusBar,
m_wndSysStatusBar.GetDlgCtrlID()
)
)
{
TRACE0("Failed to create m_wndInBarEdit\n");
return -1; // fail to create
}
...
///////////////////////////////////////////
It looked fine in running while when program exited, VC.net 2003 DEBUG Model reported
exception in dbgheap.c
_CRTIMP int __cdecl _CrtIsValidHeapPointer(
const void * pUserData
)
and then reported memory leak.
What should i do?