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. File Associations

File Associations

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialc++question
5 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.
  • D Offline
    D Offline
    Dor
    wrote on last edited by
    #1

    Does anybody know how to or even if you can register file associations in VC++. for example, when you double click on a .doc, it will open in word. that kind of stuff, i know you can do it in InstallShield, but is there a way to do it in the code? Cheers Dor

    R 2 Replies Last reply
    0
    • D Dor

      Does anybody know how to or even if you can register file associations in VC++. for example, when you double click on a .doc, it will open in word. that kind of stuff, i know you can do it in InstallShield, but is there a way to do it in the code? Cheers Dor

      R Offline
      R Offline
      Rama Krishna Vavilala
      wrote on last edited by
      #2

      Yes you can. You need to set certain registry keys. The details can be found in this link.

      1 Reply Last reply
      0
      • D Dor

        Does anybody know how to or even if you can register file associations in VC++. for example, when you double click on a .doc, it will open in word. that kind of stuff, i know you can do it in InstallShield, but is there a way to do it in the code? Cheers Dor

        R Offline
        R Offline
        Rama Krishna Vavilala
        wrote on last edited by
        #3

        If you are using MFC you could look at CWinApp::RegisterShellFileTypes. You may even refer to the code of the function to figure out how it is done.

        D 1 Reply Last reply
        0
        • R Rama Krishna Vavilala

          If you are using MFC you could look at CWinApp::RegisterShellFileTypes. You may even refer to the code of the function to figure out how it is done.

          D Offline
          D Offline
          Dor
          wrote on last edited by
          #4

          thanks

          A 1 Reply Last reply
          0
          • D Dor

            thanks

            A Offline
            A Offline
            Alexandru Savescu
            wrote on last edited by
            #5

            If you create a MFC SDI or MDI application with the wizard, some time at step 4 (i'm not sure) you can click the advanced button and define custom file format for your application. Then the wizard will crete a REG file in the project directory. You can have a look at it and see how they do it. Best regards, Alexandru Savescu

            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