这段代码怎么回事?
CChatterApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CChatterApp initialization
BOOL CChatterApp::InitInstance()
{
if (!AfxSocketInit())
{
AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
return FALSE;
}
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
LoadStdProfileSettings(); // Load standard INI file options (including MRU)
// Register the application's document templates. Document templates
// serve as the connection between documents, frame windows and views.
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CChatDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CChatView));
AddDocTemplate(pDocTemplate);
MessageBox(NULL,L"1111",L"111",MB_OK);//为什么加了这句后下面的OnFileNew()不能正常工作,菜单不能显示
OnFileNew();
return !(m_pMainWnd == NULL);
}