zstafa
asked on
What do I put in ParseParam?
I'm trying to convert my MFC to accept command line args so I do this,
CCommandLineInfo cmdInfo;
ParseCommandLine( cmdInfo );
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNoth ing;
now I'm having trouble figuring out how to do the last line
cmdArg = cmdInfo.ParseParam(??????? );
I want to read in a string, an integer, and a couple of LONGINTS.
Thanks
CCommandLineInfo cmdInfo;
ParseCommandLine( cmdInfo );
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNoth
now I'm having trouble figuring out how to do the last line
cmdArg = cmdInfo.ParseParam(???????
I want to read in a string, an integer, and a couple of LONGINTS.
Thanks
ASKER
jkr that is for a new command line instance correct? I just need to do this once at the beginning. Thanks
>>I just need to do this once at the beginning
Yes, but the principle remains the same, regardless of when you do that.
Yes, but the principle remains the same, regardless of when you do that.
ASKER
Is there any way to do this with the current direction I am going or do I have to use this plugin?
You should just use the part of the plugin's code that does the parameter parsing - no need to use the whole thing.
ASKER
In your above class where did you get the CSIPlugIn from? Could you give a little more detail please. Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
void CSIPlugIn::ParseNewCommand
{
for (int i = 0; i < m_commandLineParameters.si
{
BOOL bFlag = FALSE;
BOOL bLast = ((i + 1) == m_commandLineParameters.si
if (m_commandLineParameters[i
|| m_commandLineParameters[i]
{
m_commandLineParameters[i]
m_commandLineParameters[i]
// remove flag specifier
bFlag = TRUE;
}
rCmdInfo.ParseParam(m_comm
}
}