Extracting the called paramaters of a dialog box application  
Author Message
HelenHu





PostPosted: Mon Oct 30 10:36:57 CST 2006 Top

MFC >> Extracting the called paramaters of a dialog box application

I want to extract the parameters of which my MFC dialog box application was
called in a dos box.
Is there any api for that?

Thanks

Beni

Visual Studio199  
 
 
AliR





PostPosted: Mon Oct 30 10:36:57 CST 2006 Top

MFC >> Extracting the called paramaters of a dialog box application You can always use GetCommandLine();

AliR.



> I want to extract the parameters of which my MFC dialog box application
was
> called in a dos box.
> Is there any api for that?
>
> Thanks
>
> Beni
>
>


 
 
Tom





PostPosted: Mon Oct 30 19:17:51 CST 2006 Top

MFC >> Extracting the called paramaters of a dialog box application Take a look at:

http://msdn2.microsoft.com/en-US/library/zaydx040.aspx

Tom



>I want to extract the parameters of which my MFC dialog box application was
> called in a dos box.
> Is there any api for that?
>
> Thanks
>
> Beni
>
>


 
 
AliR





PostPosted: Tue Oct 31 09:47:52 CST 2006 Top

MFC >> Extracting the called paramaters of a dialog box application Hi Tom,

Have you used CCommandLineInfo before (Other than passing it to
ProcessShellCommands).
I haven't been able to affectivly use it.
say I have something like this
myapp.exe -r xyz

If you have a chance can you send me an example of using CCommandLineInfo to
get the parameters?

Thanks
AliR.




> Take a look at:
>
> http://msdn2.microsoft.com/en-US/library/zaydx040.aspx
>
> Tom
>


> >I want to extract the parameters of which my MFC dialog box application
was
> > called in a dos box.
> > Is there any api for that?
> >
> > Thanks
> >
> > Beni
> >
> >
>
>


 
 
AliR





PostPosted: Tue Oct 31 09:55:53 CST 2006 Top

MFC >> Extracting the called paramaters of a dialog box application I think I see how, override the CCommandLineInfo::ParseParam()

AliR.



> Hi Tom,
>
> Have you used CCommandLineInfo before (Other than passing it to
> ProcessShellCommands).
> I haven't been able to affectivly use it.
> say I have something like this
> myapp.exe -r xyz
>
> If you have a chance can you send me an example of using CCommandLineInfo
to
> get the parameters?
>
> Thanks
> AliR.
>
>


> > Take a look at:
> >
> > http://msdn2.microsoft.com/en-US/library/zaydx040.aspx
> >
> > Tom
> >


> > >I want to extract the parameters of which my MFC dialog box application
> was
> > > called in a dos box.
> > > Is there any api for that?
> > >
> > > Thanks
> > >
> > > Beni
> > >
> > >
> >
> >
>
>


 
 
Tom





PostPosted: Wed Nov 01 17:46:41 CST 2006 Top

MFC >> Extracting the called paramaters of a dialog box application Oops, I answered before seeing that you figured it out... :o)

Tom



>I think I see how, override the CCommandLineInfo::ParseParam()
>
> AliR.
>


>> Hi Tom,
>>
>> Have you used CCommandLineInfo before (Other than passing it to
>> ProcessShellCommands).
>> I haven't been able to affectivly use it.
>> say I have something like this
>> myapp.exe -r xyz
>>
>> If you have a chance can you send me an example of using CCommandLineInfo
> to
>> get the parameters?
>>
>> Thanks
>> AliR.
>>
>>


>> > Take a look at:
>> >
>> > http://msdn2.microsoft.com/en-US/library/zaydx040.aspx
>> >
>> > Tom
>> >


>> > >I want to extract the parameters of which my MFC dialog box
>> > >application
>> was
>> > > called in a dos box.
>> > > Is there any api for that?
>> > >
>> > > Thanks
>> > >
>> > > Beni
>> > >
>> > >
>> >
>> >
>>
>>
>
>


 
 
Tom





PostPosted: Wed Nov 01 17:46:18 CST 2006 Top

MFC >> Extracting the called paramaters of a dialog box application Hi Ali,

I'm not near my own code to get the stuff, but basically you derive your own
class from CCommandLineInfo and override the ParseParam function. Then your
function gets called so you can extract other parameters. I'm not sure this
is a lot easier than just looking at the _targv stuff, but ... here is an
article where this sort of thing is done...

http://www.codeguru.com/Cpp/misc/misc/consoleapps/article.php/c243

Tom


 
 
AliR





PostPosted: Thu Nov 02 09:44:43 CST 2006 Top

MFC >> Extracting the called paramaters of a dialog box application Thanks Tom. I need to remember this next time I need to parse the command
line, up til now I have been doing it the old fashioned way.

AliR.



> Oops, I answered before seeing that you figured it out... :o)
>
> Tom
>


> >I think I see how, override the CCommandLineInfo::ParseParam()
> >
> > AliR.
> >


> >> Hi Tom,
> >>
> >> Have you used CCommandLineInfo before (Other than passing it to
> >> ProcessShellCommands).
> >> I haven't been able to affectivly use it.
> >> say I have something like this
> >> myapp.exe -r xyz
> >>
> >> If you have a chance can you send me an example of using
CCommandLineInfo
> > to
> >> get the parameters?
> >>
> >> Thanks
> >> AliR.
> >>
> >>


> >> > Take a look at:
> >> >
> >> > http://msdn2.microsoft.com/en-US/library/zaydx040.aspx
> >> >
> >> > Tom
> >> >


> >> > >I want to extract the parameters of which my MFC dialog box
> >> > >application
> >> was
> >> > > called in a dos box.
> >> > > Is there any api for that?
> >> > >
> >> > > Thanks
> >> > >
> >> > > Beni
> >> > >
> >> > >
> >> >
> >> >
> >>
> >>
> >
> >
>
>