CWinApp::m_lpCmdLine
对应于Windows传递的 lpCmdLine 参数传递给 WinMain。
LPTSTR m_lpCmdLine;
备注
指向指定应用程序的命令行一个Null终止的字符串。 当应用程序启动后,请使用 m_lpCmdLine 访问任何命令行参数用户输入。 m_lpCmdLine 是类型 LPTSTR的公共变量。
示例
if (m_lpCmdLine[0] == _T('\0'))
{
// Create a new (empty) document.
OnFileNew();
}
else
{
// Open a file passed as the first command line parameter.
OpenDocumentFile(m_lpCmdLine);
}
要求
Header: afxwin.h