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. comand line

comand line

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
6 Posts 5 Posters 2 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.
  • B Offline
    B Offline
    balu_pl
    wrote on last edited by
    #1

    How to take "argc" (like comand line) in dialog based aplication?

    M R J G B 5 Replies Last reply
    0
    • B balu_pl

      How to take "argc" (like comand line) in dialog based aplication?

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

      The C runtime sets up the globals __argc and __argv which function just like argc and argv in a command-line app. --Mike-- Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber "You have Erica on the brain" - Jon Sagara to me

      1 Reply Last reply
      0
      • B balu_pl

        How to take "argc" (like comand line) in dialog based aplication?

        R Offline
        R Offline
        Rage
        wrote on last edited by
        #3

        GetCommandLine() in MFC. ~RaGE();

        1 Reply Last reply
        0
        • B balu_pl

          How to take "argc" (like comand line) in dialog based aplication?

          J Offline
          J Offline
          Jeremy Falcon
          wrote on last edited by
          #4

          If you are not using MFC, it's also in your WinMain() fuction...

          WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)

          Jeremy Falcon

          1 Reply Last reply
          0
          • B balu_pl

            How to take "argc" (like comand line) in dialog based aplication?

            G Offline
            G Offline
            Gil Messerman
            wrote on last edited by
            #5

            GetCommandLine returns you a string (LPTSTR) to command line including the program name, so you can parse it. If you use MFC you have CWinApp::ParseCommandLine(...) and CCommandLineInfo object which does the job for you Gil

            1 Reply Last reply
            0
            • B balu_pl

              How to take "argc" (like comand line) in dialog based aplication?

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

              big thanks :)

              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