网站首页  词典首页

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

 

术语 CWinApp::ParseCommandLine
释义 CWinApp::ParseCommandLine

void ParseCommandLine( CCommandLineInfo& rCmdInfo );

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

说明:
调用这个函数以解析命令行并将参数发送到CCommandLineInfo::ParseParam,每次一个。
当你通过AppWizard开始一个新的MFC项目时,AppWizard将会创建一个Ccommand-LineInfo的本地实例,然后在InitInstance成员函数中调用ProcessShellCommand 和 ParseCommandLine。命令行的过程描述如下:
1.在InitInstance中被创建之后,CCommandLineInfo对象被传递给ParseCommandLine。
2.随后ParseCommandLine反复调用CCommandLineInfo::ParseParam,每次解析出一个参数。
3.ParseParam填充CCommandLineInfo对象,随后该对象被传递给ProcessShellCommand。
4.ProcessShellCommand处理命令行参数和标志。
注意:
如果需要的话,你可以直接调用ParseCommandLine。
有关命令行标志的描述参见CCommandLineInfo::m_nShellCommand。

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

 

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

 

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