Hi Pola,
Thanks for posting in the community.
To get arguments from the command line in MFC APP
You can tried the following code snippet:
int argCount = 0;
LPWSTR* lpArgv = ::CommandLineToArgvW
:GetCommandLineW(), &argCount);
I found a similar sample in this topic:
http://groups.google.com/groups?hl=...&rnum=1&prev=/groups?sourceid=navclient&ie=UT
F-8%26oe%3DUTF-8%26q%3DCommandLineToArgvW%2BMFC
By the way, if you get the number of the argument, such as the argCount
above, you can retrieve the Argvs directly:
__argv[0] //the execute program's fullname
__argv[1] //the first command line argument, if exist
..
__argv
// the ith command line argument, if exist
Wish it helps!
Best regards,
Gary Chang
Microsoft Online Partner Support