-
方法一将获取到 "C:\test\app.exe" -1 -2
::GetCommandLine();
-
for (int i=0;i<__argc;i++) { __targv[i]; //将依次得到C:\test\app.exe -1 -2 }
-
将获取到 -1 -2
AfxGetApp()->m_lpCmdLine;
-
如果希望支持MFC应用程序的标准命令行,还可以使用MFC中的CCommandLineInfo类。
相关文章:
::GetCommandLine();
for (int i=0;i<__argc;i++) { __targv[i]; //将依次得到C:\test\app.exe -1 -2 }
AfxGetApp()->m_lpCmdLine;
相关文章: