CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
ParseCommandLine(cmdInfo);
解决方案 »
- MapVirtualKey为什么在有的电脑上转化字符返回0
- 浏览器发给Web服务器与proxy服务器的http头有什么区别?
- 哪儿可以下载3CD的msdn Oct 2001版
- 运行时出错,不理解。
- 函数调用问题(non_static)
- 请问如何操纵一台机器上的两个网卡?
- 请教简单问题!高分请教!
- _int64转换为CString的问题!
- 怎样用代码实现查询SQL SERVER数据库中某个TABLE是否存在?
- 新手,项目用,MFC 嵌入Google离线地图 怎么通过鼠标点选位置然后在地图上标注,并显示经纬度?????
- ?怎么实现一个一运行就自动最小化到系统托盘的软件的隐藏.如ccproxy的隐藏!!
- 对话框上的文字为什么会是乱码?
第一句是创建一个CCommandLineInfo类的对象
第二句是解析命令行并且一次一个的传递参数给 CCommandLineInfo::ParseParam.
这是在MFC程序刚开始的时候所要对命令行的处理
Call this member function to parse the command line and send the parameters, one at a time, to CCommandLineInfo::ParseParam.void ParseCommandLine(
CCommandLineInfo& rCmdInfo
);
Parameters
rCmdInfo
A reference to a CCommandLineInfo object.
Res
When you start a new MFC project using the Application Wizard, the Application Wizard will create a local instance of CCommandLineInfo, and then call ProcessShellCommand and ParseCommandLine in the InitInstance member function. A command line follows the route described below: After being created in InitInstance, the CCommandLineInfo object is passed to ParseCommandLine.
ParseCommandLine then calls CCommandLineInfo::ParseParam repeatedly, once for each parameter.
ParseParam fills the CCommandLineInfo object, which is then passed to ProcessShellCommand.
ProcessShellCommand handles the command-line arguments and flags.
Note that you can call ParseCommandLine directly as needed. For a description of the command-line flags, see CCommandLineInfo::m_nShellCommand.