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. popup menu on Windows explorer

popup menu on Windows explorer

Scheduled Pinned Locked Moved C / C++ / MFC
questiontutorial
16 Posts 4 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.
  • I includeh10

    when we right-click on Windows explorer, we can see a popup menu. How to add my app on the menu? I should be something about register, what is that? thx includeh10

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

    Which file type's context menu are you interested in modifying?


    "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

    I 1 Reply Last reply
    0
    • I includeh10

      it doesn't talk about context help menu of Windows explorer. includeh10

      D Offline
      D Offline
      Debs 0
      wrote on last edited by
      #7

      One of the sections is on extending shortcut menus. Debbie

      1 Reply Last reply
      0
      • D David Crow

        Which file type's context menu are you interested in modifying?


        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        I Offline
        I Offline
        includeh10
        wrote on last edited by
        #8

        when we right click a file in Explorer, the munu pops up. we can see WinZip or "Send to" folder on it. file extension can be any, i.e. .mytype or .class includeh10

        D 1 Reply Last reply
        0
        • I includeh10

          when we right click a file in Explorer, the munu pops up. we can see WinZip or "Send to" folder on it. file extension can be any, i.e. .mytype or .class includeh10

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

          There is no single way to do this. If you are wanting to add to a context menu that already exists (e.g., the one that pops up when you right-click a .dll or .cda file), you have one set of steps. For example, if you wanted to add to the context menu of a .dll file, you could save the following to a .reg file and merge it into the registry:

          Windows Registry Editor Version 5.00

          [HKEY_CLASSES_ROOT\dllfile\shell\Calc]

          [HKEY_CLASSES_ROOT\dllfile\shell\Calc\command]
          @="c:\\winnt\\system32\\calc.exe"

          If you are wanting to create a new context menu for an extension not yet registered (e.g., .mytype), you have a different set of steps.


          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          I 1 Reply Last reply
          0
          • D David Crow

            There is no single way to do this. If you are wanting to add to a context menu that already exists (e.g., the one that pops up when you right-click a .dll or .cda file), you have one set of steps. For example, if you wanted to add to the context menu of a .dll file, you could save the following to a .reg file and merge it into the registry:

            Windows Registry Editor Version 5.00

            [HKEY_CLASSES_ROOT\dllfile\shell\Calc]

            [HKEY_CLASSES_ROOT\dllfile\shell\Calc\command]
            @="c:\\winnt\\system32\\calc.exe"

            If you are wanting to create a new context menu for an extension not yet registered (e.g., .mytype), you have a different set of steps.


            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

            I Offline
            I Offline
            includeh10
            wrote on last edited by
            #10

            DavidCrow, thanks. does "a different set of steps" mean i must use COM as suggested in previous replies? includeh10

            D 1 Reply Last reply
            0
            • I includeh10

              DavidCrow, thanks. does "a different set of steps" mean i must use COM as suggested in previous replies? includeh10

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

              Not necessarily. What do you have against COM anyhow?


              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

              I 1 Reply Last reply
              0
              • D David Crow

                Not necessarily. What do you have against COM anyhow?


                "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                I Offline
                I Offline
                includeh10
                wrote on last edited by
                #12

                i am very interested in the method of "Not necessarily", any comment about it? cheers includeh10

                D 1 Reply Last reply
                0
                • I includeh10

                  i am very interested in the method of "Not necessarily", any comment about it? cheers includeh10

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

                  It requires just a few more entries in the .reg file:

                  Windows Registry Editor Version 5.00

                  [HKEY_CLASSES_ROOT\.mytype]
                  @="MyType.Document"

                  [HKEY_CLASSES_ROOT\MyType.Document]

                  [HKEY_CLASSES_ROOT\MyType.Document\shell]

                  [HKEY_CLASSES_ROOT\MyType.Document\shell\Calc]

                  [HKEY_CLASSES_ROOT\MyType.Document\shell\Calc\command]
                  @="c:\\winnt\\system32\\calc.exe"

                  As has already been mentioned, this sort of stuff is explained in Michael Dunn's shell articles.


                  "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                  I 1 Reply Last reply
                  0
                  • D David Crow

                    It requires just a few more entries in the .reg file:

                    Windows Registry Editor Version 5.00

                    [HKEY_CLASSES_ROOT\.mytype]
                    @="MyType.Document"

                    [HKEY_CLASSES_ROOT\MyType.Document]

                    [HKEY_CLASSES_ROOT\MyType.Document\shell]

                    [HKEY_CLASSES_ROOT\MyType.Document\shell\Calc]

                    [HKEY_CLASSES_ROOT\MyType.Document\shell\Calc\command]
                    @="c:\\winnt\\system32\\calc.exe"

                    As has already been mentioned, this sort of stuff is explained in Michael Dunn's shell articles.


                    "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                    I Offline
                    I Offline
                    includeh10
                    wrote on last edited by
                    #14

                    you are talking about how to use double-clicking of a kind of file. i modified register as your comment, but i saw nothing on popup menu of Explorer. when i double clicked some.mytype, calculator was running. it is not right answer of my question. i read Michael Dunn's articles again, i can not find hint about my question. he added a program to menu folder "send to" of popup menu of Explorer by ::SHGetSpecialFolderLocation(0,CSIDL_SENDTO,&pidl) i will try to get answer from that point. cheers includeh10

                    D 1 Reply Last reply
                    0
                    • I includeh10

                      you are talking about how to use double-clicking of a kind of file. i modified register as your comment, but i saw nothing on popup menu of Explorer. when i double clicked some.mytype, calculator was running. it is not right answer of my question. i read Michael Dunn's articles again, i can not find hint about my question. he added a program to menu folder "send to" of popup menu of Explorer by ::SHGetSpecialFolderLocation(0,CSIDL_SENDTO,&pidl) i will try to get answer from that point. cheers includeh10

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

                      includeh10 wrote: when i double clicked some.mytype, calculator was running. When you right-clicked an item that had a .mytype extension, you should have seen Calc at the top of the context menu. The fact that it was bold meant that it was the default option. That's why double-clicking the item started the calculator. My example was merely that - an example. You may need to extrapolate from the examples to get what you want. Not all shell items are the same so there is no one-size-fits-all solution.


                      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                      I 1 Reply Last reply
                      0
                      • D David Crow

                        includeh10 wrote: when i double clicked some.mytype, calculator was running. When you right-clicked an item that had a .mytype extension, you should have seen Calc at the top of the context menu. The fact that it was bold meant that it was the default option. That's why double-clicking the item started the calculator. My example was merely that - an example. You may need to extrapolate from the examples to get what you want. Not all shell items are the same so there is no one-size-fits-all solution.


                        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                        I Offline
                        I Offline
                        includeh10
                        wrote on last edited by
                        #16

                        DavidCrow, i think maybe something is wrong with my test. @=mytype.document what does it exactly mean under key of .mytype? if we open regedit, it looks name ------------ data default --------- @=mytype.document or @ --------------- mytype.document or other format?? cheers includeh10

                        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