_BLOCK_TYPE_IS_VALID(phead->nBlockUse).
/*static*/
LRESULT CALLBACK CAppInterface::DlgProc( HWND hwnd, UINT msg,WPARAM
wParam, LPARAM lParam )
{
CAppInterface *p;
if(msg == WM_INITDIALOG)
{
//Retrieve Window instance from window creation data and associate
p= reinterpret_cast<CAppInterface *>(lParam);
::SetWindowLong( hwnd, GWL_USERDATA, (long)lParam );
//Constructor
p->_Analyse=new CAnalyse(p->_Avi._HwndC);<!!!!!!!!!!!!!!!!!!!
// I can use dectructor here... so it works.
delete(p->_Analyse);<!!!!!!!!!!!!!!!!!!!!!!
//Constructor again
p->_Analyse=new CAnalyse(p->_Avi._HwndC);<!!!!!!!!!!!!!!!!!!!!!!
}
p=WinGetLong<CAppInterface *>( hwnd, GWL_USERDATA);
switch(msg){
case WM_CLOSE:
DestroyWindow(p->_Avi._HwndC);
DestroyWindow(p->_Hwnd);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_COMMAND:
switch (LOWORD(wParam))
{
case BUTTON_START:
// I can use method of CAnalyse
class object,but when i try to delete() it
p->_Analyse->LoadFrame(true);<!!!!!!!!!!!!!!!!!!!!!
// i recice error
//DEBUG ASSERTION FAILED!!
// _BLOCK_TYPE_IS_VALID(...heap
pointer)...<!!!!!!!!!!!!!!!!!!!
delete(p->_Analyse); <!!!!!! THIS
break;