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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Command Line arguments in MFC

Command Line arguments in MFC

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestion
3 Posts 3 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.
  • T Offline
    T Offline
    toothless boots
    wrote on last edited by
    #1

    I was just wondering how I could get access to the command line arguments in MFC? I know in C it would have been the argv[] parameter in the main, but I don't know how to get that in MFC. Thanks, David

    T D 2 Replies Last reply
    0
    • T toothless boots

      I was just wondering how I could get access to the command line arguments in MFC? I know in C it would have been the argv[] parameter in the main, but I don't know how to get that in MFC. Thanks, David

      T Offline
      T Offline
      ThatsAlok
      wrote on last edited by
      #2

      toothless boots wrote: I was just wondering how I could get access to the command line arguments in MFC? I know in C it would have been the argv[] parameter in the main, but I don't know how to get that in MFC. MAY BE THIS CLASS WILL HELP YOU class CCommandLineInfo :rose: ----------------------------- "I Think It will Work" ----------------------------- Alok Gupta visit me at http://www.thisisalok.tk

      1 Reply Last reply
      0
      • T toothless boots

        I was just wondering how I could get access to the command line arguments in MFC? I know in C it would have been the argv[] parameter in the main, but I don't know how to get that in MFC. Thanks, David

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

        toothless boots wrote: I know in C it would have been the argv[] parameter in the main You can still use __argc and __argv. From the application object, you have access to the m_lpCmdLine member.


        "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

        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