这个问题涉及到进程(程序)初始化时的启动参数的定制问题。大家都知道,在CWinApp的初始化函数InitInstance()中有这样两句初始化程序启动参数的两句:// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);请改为:
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
if (cmdInfo.m_nShellCommand==FileNew)
cmdInfo.m_nShellCommand=CCommandLineInfo::FileNothing;  //不生成默认空白文档m_nShellCommand可能的值还有:
FileNew   FileOpen   FilePrint  FilePrintTo  FileDDE    FileNothing而CCommandLineInfo类的主要成员有:
…………(对不起,太多,我就不列了,去MSDN“索引”用“CCommandLineInfo”看一下详情吧)了解了这几点,你就能定制你的程序的启动参数了!
注:在程序外自动启动程序激活文档是默认行为,无需你定制)