Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Windows app command line args

Windows app command line args

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    act_x
    wrote on last edited by
    #1

    I need to pass Command line arguments to my MFC wizard created app and store the values in a local variable . Where can i trap these values in code ? I need something like main(int argc ,char *argv[]) Please help

    D M B 3 Replies Last reply
    0
    • A act_x

      I need to pass Command line arguments to my MFC wizard created app and store the values in a local variable . Where can i trap these values in code ? I need something like main(int argc ,char *argv[]) Please help

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      See CWinApp::m_lpCmdLine.


      Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

      1 Reply Last reply
      0
      • A act_x

        I need to pass Command line arguments to my MFC wizard created app and store the values in a local variable . Where can i trap these values in code ? I need something like main(int argc ,char *argv[]) Please help

        M Offline
        M Offline
        Michael Dunn
        wrote on last edited by
        #3

        The CRT also sets up the global variables __argv and __argc for you, which mirror argc and argv that you get in a console mode app. --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber Actual sign at the laundromat I go to: "No tinting or dying."

        A 1 Reply Last reply
        0
        • M Michael Dunn

          The CRT also sets up the global variables __argv and __argc for you, which mirror argc and argv that you get in a console mode app. --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber Actual sign at the laundromat I go to: "No tinting or dying."

          A Offline
          A Offline
          act_x
          wrote on last edited by
          #4

          CRT ? Engineering is the effort !

          J 1 Reply Last reply
          0
          • A act_x

            CRT ? Engineering is the effort !

            J Offline
            J Offline
            Jorgen Sigvardsson
            wrote on last edited by
            #5

            C Run Time. printf et al. :) -- 20 eyes in my head, they're all the same![^]

            1 Reply Last reply
            0
            • A act_x

              I need to pass Command line arguments to my MFC wizard created app and store the values in a local variable . Where can i trap these values in code ? I need something like main(int argc ,char *argv[]) Please help

              B Offline
              B Offline
              braddenn
              wrote on last edited by
              #6

              see the following MFC stuff: // Parse command line for standard shell commands, DDE, file open CCommandLineInfo cmdInfo; ParseCommandLine(cmdInfo); After the call to ParseCommandLine() everything will be placed in to cmdInfo. So Hum

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups