I tried the following code:

void CMainFrame::OnSystemAlert()
{
CWindowsProcessView* p = (CWindowsProcessView*)AfxGetMainWnd();
p->InsertAlert(1);
p->SendMessage(WM_COMMAND,0,0);
}




It compiles but gives me an exception breakpoint.