Hi,
I have a CDIalog MFC based win ap under MSVC 6.0

Now I need to configure it for parsing command line parameters ,,,,
where and which function does accept argc, char** argv as there is no
main()

Kindly help

Thanks,
a.a.cpp

Re: parsing command line args in CDialog app by Jeff

Jeff
Thu Jun 02 03:43:35 CDT 2005

"iceColdFire" <icoldfire@yahoo.com> wrote in message
news:1117697697.874470.34650@g47g2000cwa.googlegroups.com...
> Hi,
> I have a CDIalog MFC based win ap under MSVC 6.0
>
> Now I need to configure it for parsing command line parameters ,,,,
> where and which function does accept argc, char** argv as there is no
> main()

http://www.microsoft.com/msj/1099/c/c1099.aspx
--
Jeff Partch [VC++ MVP]



Re: parsing command line args in CDialog app by thatsalok

thatsalok
Thu Jun 02 03:54:57 CDT 2005

two option:

Either call API [GetCommandLine] or

call global variable

AfxGetApp()->m_lpCmdLine


--
cheers,
Alok Gupta
Visit me at http://alok.bizhat.com

"iceColdFire" <icoldfire@yahoo.com> wrote in message
news:1117697697.874470.34650@g47g2000cwa.googlegroups.com...
> Hi,
> I have a CDIalog MFC based win ap under MSVC 6.0
>
> Now I need to configure it for parsing command line parameters ,,,,
> where and which function does accept argc, char** argv as there is no
> main()
>
> Kindly help
>
> Thanks,
> a.a.cpp
>



RE: parsing command line args in CDialog app by armancho_x

armancho_x
Thu Jun 02 03:56:02 CDT 2005

Hi
Use CCommandLineInfo class, CWinApp::ParseCommandLine method.
The latter calls
CCommandLineInfo::ParseParam( LPCTSTR lpszParam, BOOL bFlag, BOOL bLast ).
Considering bFlag value, it defines if lpszParam is a parameter or flag.

Derive a class from CCommandLineInfo, override ParseParam method
and place the necessary code in it.


--
======
Arman

Re: parsing command line args in CDialog app by Nishant

Nishant
Thu Jun 02 05:33:37 CDT 2005

You've seen the other answers - here's another way to do it

for(int i=0; i<__argc; i++)
MessageBox(__argv[i]);

--
Regards,
Nish [VC++ MVP]
http://www.voidnish.com
http://blog.voidnish.com


"iceColdFire" <icoldfire@yahoo.com> wrote in message
news:1117697697.874470.34650@g47g2000cwa.googlegroups.com...
> Hi,
> I have a CDIalog MFC based win ap under MSVC 6.0
>
> Now I need to configure it for parsing command line parameters ,,,,
> where and which function does accept argc, char** argv as there is no
> main()
>
> Kindly help
>
> Thanks,
> a.a.cpp
>