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. Overriding right click actions

Overriding right click actions

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
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.
  • L Offline
    L Offline
    Lilian Chan Grant
    wrote on last edited by
    #1

    Please help a novice... You know how in Windows Explorer you can right click a file, select Properties, and the dialog appears? I need files of a particular extension to execute MY DLL in lieu of the Windows File Properties actions. Does anyone know how to do this? I'd appreciate any help. Thanks.:confused:

    L 1 Reply Last reply
    0
    • L Lilian Chan Grant

      Please help a novice... You know how in Windows Explorer you can right click a file, select Properties, and the dialog appears? I need files of a particular extension to execute MY DLL in lieu of the Windows File Properties actions. Does anyone know how to do this? I'd appreciate any help. Thanks.:confused:

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      The Properties menu item is part of the OS (it connects to some OS functions that tell you stuff like the date the file was created, last modified, MSDOS name, etc). You can edit the registry to add addition items to the menu (ie "Settings" in addition to the "Properties" menu item). To do this, you can edit the registry by hand or copy the following script (replacing with your apps names and extensions ; Script starts here REGEDIT HKEY_CLASSES_ROOT\.ext = My.Document HKEY_CLASSES_ROOT\My.Document = My Document HKEY_CLASSES_ROOT\My.Document\shell\mycommand = &My Command HKEY_CLASSES_ROOT\My.Document\shell\mycommand\command = "C:\thing\to\execute" "arguments" ; End script Replace . . . .ext with your extension My.Document with your Document type (must match with the Document type your application wants) My Document with you Document name (can be anything you want to appear in Windows Properties mycommand with the name of the command you want (ie Settings) &My Command with the string you want to appear in the drop down menu (the & will underline the following character so if you right click and press M, for this example, it would run My Command) "C:\thing\to\execute" with the path to your program or dll (you may need a surrogate for a dll) "arguments" with any arguments your application needs (ie filename) Hope this helps Zac

      L 1 Reply Last reply
      0
      • L Lost User

        The Properties menu item is part of the OS (it connects to some OS functions that tell you stuff like the date the file was created, last modified, MSDOS name, etc). You can edit the registry to add addition items to the menu (ie "Settings" in addition to the "Properties" menu item). To do this, you can edit the registry by hand or copy the following script (replacing with your apps names and extensions ; Script starts here REGEDIT HKEY_CLASSES_ROOT\.ext = My.Document HKEY_CLASSES_ROOT\My.Document = My Document HKEY_CLASSES_ROOT\My.Document\shell\mycommand = &My Command HKEY_CLASSES_ROOT\My.Document\shell\mycommand\command = "C:\thing\to\execute" "arguments" ; End script Replace . . . .ext with your extension My.Document with your Document type (must match with the Document type your application wants) My Document with you Document name (can be anything you want to appear in Windows Properties mycommand with the name of the command you want (ie Settings) &My Command with the string you want to appear in the drop down menu (the & will underline the following character so if you right click and press M, for this example, it would run My Command) "C:\thing\to\execute" with the path to your program or dll (you may need a surrogate for a dll) "arguments" with any arguments your application needs (ie filename) Hope this helps Zac

        L Offline
        L Offline
        Lilian Chan Grant
        wrote on last edited by
        #3

        Thanks for your help :-D This requirement is always changing...

        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