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. How to modify Global System Menu?

How to modify Global System Menu?

Scheduled Pinned Locked Moved C / C++ / MFC
c++comtutorialquestion
13 Posts 6 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.
  • J Offline
    J Offline
    Jijo Raj
    wrote on last edited by
    #1

    How to append a new menu item to global system menu. I.e. to system menu of all applications. Well, for a single application it can be done easly by using GetSystemMenu(). But how to do it system wide? I saw one application doing the same. When i checked the dlls, of the application I could see the MouseHookProc() in exported functions and I guess that its doing it by a global mouse hook. But after long R&D I couldn't figure out how. Any hints guys? Thanks & Regards, Jijo.

    _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

    CPalliniC S S M 4 Replies Last reply
    0
    • J Jijo Raj

      How to append a new menu item to global system menu. I.e. to system menu of all applications. Well, for a single application it can be done easly by using GetSystemMenu(). But how to do it system wide? I saw one application doing the same. When i checked the dlls, of the application I could see the MouseHookProc() in exported functions and I guess that its doing it by a global mouse hook. But after long R&D I couldn't figure out how. Any hints guys? Thanks & Regards, Jijo.

      _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      Well, even Jijo raj wasn't able to do that, so far... :-D

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      In testa che avete, signor di Ceprano?

      J 1 Reply Last reply
      0
      • J Jijo Raj

        How to append a new menu item to global system menu. I.e. to system menu of all applications. Well, for a single application it can be done easly by using GetSystemMenu(). But how to do it system wide? I saw one application doing the same. When i checked the dlls, of the application I could see the MouseHookProc() in exported functions and I guess that its doing it by a global mouse hook. But after long R&D I couldn't figure out how. Any hints guys? Thanks & Regards, Jijo.

        _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

        S Offline
        S Offline
        Sarath C
        wrote on last edited by
        #3

        Jijo, I never tried this can't you use systemwide api hooking?

        -Sarath. "Great hopes make everything great possible" - Benjamin Franklin

        My blog - Sharing My Thoughts

        J 1 Reply Last reply
        0
        • CPalliniC CPallini

          Well, even Jijo raj wasn't able to do that, so far... :-D

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
          [My articles]

          J Offline
          J Offline
          Jijo Raj
          wrote on last edited by
          #4

          I did expect you'll reply with some funny quotes. :laugh: Regards, Jijo.

          _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

          CPalliniC 1 Reply Last reply
          0
          • S Sarath C

            Jijo, I never tried this can't you use systemwide api hooking?

            -Sarath. "Great hopes make everything great possible" - Benjamin Franklin

            My blog - Sharing My Thoughts

            J Offline
            J Offline
            Jijo Raj
            wrote on last edited by
            #5

            yeah! That seems to be a possibility. I could hook GetSystemMenu() and add another system wide window message hook for WM_COMMAND and handle the message. But I strongly feels that there is some easy way to do it. Well, thanks Sarath for the thought. Ofcourse you always "Shares your thought"! ;) Regards, Jijo.

            _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

            1 Reply Last reply
            0
            • J Jijo Raj

              I did expect you'll reply with some funny quotes. :laugh: Regards, Jijo.

              _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

              CPalliniC Offline
              CPalliniC Offline
              CPallini
              wrote on last edited by
              #6

              This time I have no technical answer, unfortunately... :sigh:

              If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
              This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
              [My articles]

              In testa che avete, signor di Ceprano?

              J H 2 Replies Last reply
              0
              • CPalliniC CPallini

                This time I have no technical answer, unfortunately... :sigh:

                If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                [My articles]

                J Offline
                J Offline
                Jijo Raj
                wrote on last edited by
                #7

                Don't worry mate. At least you cheered up me! :-D Regards, Jijo.

                _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

                1 Reply Last reply
                0
                • J Jijo Raj

                  How to append a new menu item to global system menu. I.e. to system menu of all applications. Well, for a single application it can be done easly by using GetSystemMenu(). But how to do it system wide? I saw one application doing the same. When i checked the dlls, of the application I could see the MouseHookProc() in exported functions and I guess that its doing it by a global mouse hook. But after long R&D I couldn't figure out how. Any hints guys? Thanks & Regards, Jijo.

                  _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

                  S Offline
                  S Offline
                  SandipG
                  wrote on last edited by
                  #8

                  What about Using EnumWindows to get all top level windows and then modify the menu? Also you will have to add hook for new window creation notifications. I dont know if it will work but just a thought..

                  Regards, Sandip.

                  J 1 Reply Last reply
                  0
                  • J Jijo Raj

                    How to append a new menu item to global system menu. I.e. to system menu of all applications. Well, for a single application it can be done easly by using GetSystemMenu(). But how to do it system wide? I saw one application doing the same. When i checked the dlls, of the application I could see the MouseHookProc() in exported functions and I guess that its doing it by a global mouse hook. But after long R&D I couldn't figure out how. Any hints guys? Thanks & Regards, Jijo.

                    _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

                    M Offline
                    M Offline
                    Malli_S
                    wrote on last edited by
                    #9

                    I haven't tried it with 'Mouse Hook', but did with 'Windows Procedure Hook'. Installed a hook for WH_CALLWNDPROC (Windows procedure) and handled the 'WM_INITMENU' message in the hook. Once you get the window handle in the hook, I hope you don't need any more clues.... :cool:

                    -Malli...! :rose:****

                    J 1 Reply Last reply
                    0
                    • CPalliniC CPallini

                      This time I have no technical answer, unfortunately... :sigh:

                      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                      [My articles]

                      H Offline
                      H Offline
                      Hamid Taebi
                      wrote on last edited by
                      #10

                      You can ask of your site. :-D

                      Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

                      1 Reply Last reply
                      0
                      • M Malli_S

                        I haven't tried it with 'Mouse Hook', but did with 'Windows Procedure Hook'. Installed a hook for WH_CALLWNDPROC (Windows procedure) and handled the 'WM_INITMENU' message in the hook. Once you get the window handle in the hook, I hope you don't need any more clues.... :cool:

                        -Malli...! :rose:****

                        J Offline
                        J Offline
                        Jijo Raj
                        wrote on last edited by
                        #11

                        That seems to be a cool Idea! Let me try it out. Thanks a lot malli, and please accept my 5 points. ;) Regards, Jijo.

                        _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

                        M 1 Reply Last reply
                        0
                        • S SandipG

                          What about Using EnumWindows to get all top level windows and then modify the menu? Also you will have to add hook for new window creation notifications. I dont know if it will work but just a thought..

                          Regards, Sandip.

                          J Offline
                          J Offline
                          Jijo Raj
                          wrote on last edited by
                          #12

                          That's also a possibility to experiment. I think, in order to handle the message, i've to add one message hook as well. isn't it? Well, thanks a lot Sandeep and my 5 points. ;) Regards, Jijo.

                          _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

                          1 Reply Last reply
                          0
                          • J Jijo Raj

                            That seems to be a cool Idea! Let me try it out. Thanks a lot malli, and please accept my 5 points. ;) Regards, Jijo.

                            _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

                            M Offline
                            M Offline
                            Malli_S
                            wrote on last edited by
                            #13

                            My pleasure..... :)

                            -Malli...! :rose:****

                            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