Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7747029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:25:44+00:00 2026-06-01T10:25:44+00:00

As the context menu for the desktop and explorer windows is disabled, I wanted

  • 0

As the context menu for the desktop and explorer windows is disabled, I wanted to make a little something to bring back some functionality. My idea was to just list out things in a context menu (copy, paste, new, open with, etc) whenever a user right-clicks one of these windows, and then just simulate the appropriate event in the actual menu (file->new, edit->copy, etc). It wouldn’t look perfectly pretty, but it would hopefully allow for the use of right-clicking.

The problem is that I cannot seem to get the actual menu. I opened My Documents and tried going down the child list towards SysListView32, calling GetMenuItemCount each time. Most returned -1, and the only other return value than that was 0.

How am I supposed to get a handle to the (file, edit, view…) menu?
If this isn’t possible, is there a way I could simulate the user clicking something on the normal context menu, even if it’s disabled?

Also, is there a way of making this work for the desktop? You can get the same type of thing if you view it in the explorer window, so I figured there might be a way.

I’m running Windows XP and any help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T10:25:45+00:00Added an answer on June 1, 2026 at 10:25 am

    As per David Heffernan’s comment,

    As for your question, you are on the wrong track. 
    GetMenuItemCount needs an HMENU but you've been feeding it HWND. 
    That won't work. It also won't work from a different process. 
    You could possibly write a program that use the shell COM APIs 
    to show a context menu for a shell item. But your basic problem 
    is the bone-headed group policy. You really need to get that fixed. 
    Tell the IT guy that takes the decision that I said he was a fool 
    and was stopping you doing any useful work. ;-)
    

    This led me onto the path of using the correct alternative method to achieve my goal.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read these: Adding item to the Desktop context menu in Windows http://www.informit.com/articles/article.aspx?p=169474
My extension adds a context menu whenever a user selects some text on the
I have a Windows context menu item invoking a Windows Form via these registry
I have added a context menu item in Explorer. I added it via a
My context menu on my solution explorer is way too long, although I am
Some time ago I asked about how to pop up the Windows context (right-click)
extjs context menu is showing up occaisionally in the wrong place. Top left of
WebBrowser context menu or custom context menu does not shown over combobox. How to
how to show a context menu when you right click within a QGLWidget?
I am using a context menu for my gridcontrol. theGrid.ContextMenuStrip = contextMenuStrip1; This has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.