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

command line

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
3 Posts 2 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.
  • R Offline
    R Offline
    Russell
    wrote on last edited by
    #1

    If I double click a file into explorer that has the right extension then my app is lounced, and the command line (see __argc and __targv) is like this: C:\MyApp.exe /dde What is "/dde" ?:confused: I was expecting the name of the file.... i.e. something like this C:\MyApp.exe C:\testfile.txt Any help? How can I get the filename I need?


    Russell

    D 1 Reply Last reply
    0
    • R Russell

      If I double click a file into explorer that has the right extension then my app is lounced, and the command line (see __argc and __targv) is like this: C:\MyApp.exe /dde What is "/dde" ?:confused: I was expecting the name of the file.... i.e. something like this C:\MyApp.exe C:\testfile.txt Any help? How can I get the filename I need?


      Russell

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

      Russell' wrote:

      What is "/dde" ?

      Dynamic Data Exchange. Check your app's associated extension (and type) in the registry.

      Russell' wrote:

      Any help? How can I get the filename I need?

      Again in the registry, you'll need %1 added to the end of your app's command line.

      "Love people and use things, not love things and use people." - Unknown

      "The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch

      R 1 Reply Last reply
      0
      • D David Crow

        Russell' wrote:

        What is "/dde" ?

        Dynamic Data Exchange. Check your app's associated extension (and type) in the registry.

        Russell' wrote:

        Any help? How can I get the filename I need?

        Again in the registry, you'll need %1 added to the end of your app's command line.

        "Love people and use things, not love things and use people." - Unknown

        "The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch

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

        Yes!!! you are right. Solved...but only temporary, because every time that my app is closed it is restored the same old/bad values into the registry. My application is a MDI MFC program. Some days ago I edited the String into the resource named **MID**_MYAPP_**TYPE**. I'm seeing that that string is passed to the constructor CMultiDocTemplate (into InitInstance of the application). That day I was surprised that the files where drawed into explorer with the same icon of the app. I'm thinking that it is there that the app is automatically linked to the extension that I'm using with the program. And every time the program is lounced the same setting are stored. Can it be true? Do you know how can I avoid this problem?


        Russell

        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