网站首页  词典首页

请输入您要查询的计算机术语:

 

术语 CWinApp::ProcessShellCommand
释义 CWinApp::ProcessShellCommand

BOOL ProcessShellCommand( CCommandLineInfo& rCmdInfo );

返回值:如果成功地处理了外壳命令,则返回非零值。如果InitInstance返回了FALSE,则返回0。

参数:
rCmdInfo对CCommandLineInfo对象的引用。

说明:
这个成员函数被InitInstance调用,用以接收rCmdInfo所标识的CCommandLineInfo对象传递的参数,并执行指定的动作。
当你通过AppWizard开始一个MFC的新项目时,AppWizard将创建CCommandLineInfo的一个本地实例,然后在InitInstance成员函数中调用ProcessShellCommand和ParseCommandLine。命令行按照下面描述的路线传递:
1.在InitInstance中被创建以后,CCommandLineInfo对象将它传递给ParseCommand-Line。
2.随后ParseCommandLine反复调用CCommandLineInfo::ParseParam,每次解析一个参数。
3.ParseParam填充CCommandLineInfo对象,然后将之传递给ProcessShellCommand。
4.ProcessShellCommand处理命令行参数和标志。
CCommandLineInfo对象中用CCommandLineInfo::m_nShellCommand标识的数据成员属于下面的枚举类型,它在CCommandLineInfo类中定义。
enum{ FileNew,FileOpen,FilePrint,FilePrintTo,FileDDE,};
有关这些值的简要描述参见CCommandLineInfo::m_nShellCommand。

请参阅:
CWinApp::ParseCommandLine, CCommandLineInfo, CCommandLineInfo::ParseParam, CCommandLineInfo::m_nShellCommand
随便看

 

MFC类库中文详解手册包含4274条MFC类库参考词条,基本涵盖了Microsoft基本类库中的类、全局函数、全局变量和宏的内容,是计算机编程的有利工具。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 12:26:34