Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CWinApp::OnFileNew() crashing why?

Status
Not open for further replies.

kedlaya

Programmer
Joined
Oct 21, 2003
Messages
1
Location
IN
Hi all,
Whenevr I select "new" in menu my application is giving memory error and the application is terminationg.Here is the function in which I am calling this.
afx_msg void CMyApp::OnAppFileNew( )
{
static BOOL bFirstTime = TRUE;
CWinApp::OnFileNew(); // <---------------Here

CMenu *pMenu = (((CMainFrame *)m_pMainWnd)->GetMenu());
CMenu *pSubMenu = pMenu->GetSubMenu(0);

if(!bFirstTime)
{
((CMainFrame *)m_pMainWnd)->m_pInvisibleSpliter->SwitchView(0,1,RUNTIME_CLASS(myactivity),CSize(0,0));
}
bFirstTime = FALSE;
}

I am using Win2k with SP 4 VS 6.0
Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top