|
-
September 22nd, 2001, 12:57 AM
#1
argc argv
How can I get the Argument in the MFC program.
Do they support the special member value or function in the MFC?
-
September 22nd, 2001, 02:58 AM
#2
Re: argc argv
CWinApp::m_lpCmdLine
CWinApp::ParseCommandLine
Please - rate answer if it helped you
It gives me inspiration when I see myself in the top list =)
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
[email protected] | ICQ:57404554 | http://soukhov.com
Member of Russian Software Developer Network http://rsdn.ru
-
September 22nd, 2001, 03:07 AM
#3
Re: argc argv
Hi
You can use directly the
LPTSTR GetCommandLine(VOID); function in InitInstance() function of ur application class before initialization. This will return a string which u can parse to get the options.
OR
look at the CwinApp: functions, and CCommandLineInfo class.
CWinAPp::ParseCommandLine(cmdInfo);
Regards
S.K.Pradhan
Be sure to rate answers if it helped, to encourage them.
-
September 22nd, 2001, 11:49 AM
#4
Re: argc argv
The argc and argv of a traditional C program are available to you in __argc and __targv[] and the whole command line is in CWinApp::m_lpCmdLine.
Hope this helps
Eugene Gill
Please take the time to reply and/or rate this answer if you found it useful.
Other readers will then be better informed.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|