CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 1999
    Posts
    24

    How does DocView architecture handles commandline params?

    Hi all,
    1. How does an application generated by AppWizard handles command-line parameters? What are the steps being taken internally? I understand that ParseCommandLine(cmdInfo); is called to parse the command-line, and then the ProcessShellCommand(cmdInfo); is called to process the following shell commands:

    app ------------------------------------------ New file.
    app filename -------------------------------- Open file.
    app /p filename ----------------------------- Print file to default printer.
    app /pt filename printer driver port ------- Print file to the specified printer.
    app /dde ------------------------------------ Start up and await DDE command.
    app /Automation --------------------------- Start up as an OLE automation server.
    app /Embedding --------------------------- Start up to edit an embedded OLE item.


    2. My problem now is that I need to handle other command-line switches, such as, "app -c" , "app /c", or "app filename1 filename2 -d", etc. How and where do I handle all these in an application generated by AppWizard?

    3. Thanks in advance for any help rendered.




    Gladywin Yap
    120499


  2. #2
    Join Date
    May 1999
    Location
    Antwerp, Belgium
    Posts
    136

    Re: How does DocView architecture handles commandline params?

    You have to derive a new class from CCommandLineInfo to handle your own flags and parameters. Override ParseParam to handle the new flags.


  3. #3
    Join Date
    Apr 1999
    Posts
    43

    Re: How does DocView architecture handles commandline params?

    If you need a sample, I'll send you one via E-Mail.

    Mike


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured