编译环境:win2000、VC6++/sp5: // Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo); // Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;我在CTestApp::InitInstance()中去掉了上述语句,怎么还是可以在资源管理器中双击文档打开?
ProcessShellCommand(cmdInfo)还有什么用?
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo); // Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;我在CTestApp::InitInstance()中去掉了上述语句,怎么还是可以在资源管理器中双击文档打开?
ProcessShellCommand(cmdInfo)还有什么用?
简单地说,就是分析你的运行程序的命令行参数,比如,你写了一个NotepadEx.exe,然后运行NotepadEx.exe test.txt,那么ProcessShellCommand()会检查到有test.txt这个参数,于是就会去打开这个文挡,否则,如果为空,则缺省情况下会自动打开一个空文档。