Multi-Language Scribble。看着这个例子试着做个含带多国语言的程序。我的程序是单文本的。例子是多文本的。多国语言切换部分的代码。两者代码一致。 先贴一部分代码说:CMultiDocTemplate* pDocTemplate;
pDocTemplate = new CMultiDocTemplate(
IDR_SCRIBBTYPE,
RUNTIME_CLASS(CScribbleDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CScribbleView));
AddDocTemplate(pDocTemplate);
// Connect the COleTemplateServer to the document template.
//  The COleTemplateServer creates new documents on behalf
//  of requesting OLE containers by using information
//  specified in the document template.
m_server.ConnectTemplate(clsid, pDocTemplate, FALSE);
CMainFrame* pMainFrame = new CMainFrame;
if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
return FALSE;
m_pMainWnd = pMainFrame; // Enable drag/drop open.  We don't call this in Win32, since a
//  document file extension wasn't chosen while running AppWizard.
m_pMainWnd->DragAcceptFiles(); // Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo); // Check to see if launched as OLE server
if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated)
{
// Application was run with /Embedding or /Automation.  Don't show the
//  main window in this case.
return TRUE;
} // Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;程序运行以后,我的程序发现有两个MainFrame。跟着断点查了一下,发现ProcessShellCommand(cmdInfo)这个函数,重新OnCreate了一次造成的。请问哪位能给我讲讲如何能让我的程序正常运行啊?
PS:不要说把ProcessShellCommand(cmdInfo)给屏蔽掉这样的话,屏蔽掉的话程序会直接挂掉。