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 8526411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:15:55+00:00 2026-06-11T08:15:55+00:00

After performing some Google-fu and searching Stack Overflow I’ve been unable to find a

  • 0

After performing some Google-fu and searching Stack Overflow I’ve been unable to find a way to access the right click menu of an item and read data or select an item from it. I’ve looked up methods for SendMessage and PostMessage

What I’ve done so far:

This is an example of post here that would have been exactly what I want if it didn’t use Qt and would work on an external application. Everything I’ve been able to find is about creating a right click menu when I just want to view an external application’s right click menu.

I’ve tried getting the handle of the context menu using Spy++ but the menu just disappears as soon as I select the “Find Window” option in Spy++ (which is to be expected).

The only way I could think of doing this is using mouse_event to display the box but then I don’t know where to go from there. I feel like this would also be very inefficient.

I’m working on some legacy code so I don’t have a lot of choice in what I can use, if it’s possible I’d like to not use libraries that aren’t included in Visual Studio 2008.

What I’m trying to do:

I’m looking for a way to access the right click context menu in an external application and read the data in it and then select an item. I feel like this should be really simple but my research skills are subpar. If anyone can point me in the right direction I would really appreciate it.

Thank you for reading!

  • 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-11T08:15:57+00:00Added an answer on June 11, 2026 at 8:15 am

    The only way you can get hold of a context menu is to make the application display it. It doesn’t exist otherwise. (The other question you give as an example is regarding the Windows Shell menu which is designed to be useable)

    A window gets sent WM_CONTEXTMENU when the user right clicks, so you could use SendMessage() to invoke the menu, or failing that just send a right click.

    After a bit of googling, I think context menus have a classname of #32768, so you could use FindWindowEx to find a child window handle with the matching classname.

    Once you have the window handle, you can use the MN_GETHMENU message to get hold of the menu handle.

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

Sidebar

Related Questions

I am having a problem with precision of a double after performing some operations
After performing some tests I noticed that printf is much faster than cout .
After performing some operations I am getting a set of records. Example: a b
I have a download page in php that after performing some checks returns a
I have written a GUI application which after performing some analyses on a large
Just after some opinions on the best way to achieve the following outcome: I
I am creating a utility to insert few records into SQL after performing some
I want to show a specific ViewController (or dismiss) a View after performing an
I am having a problem where, after performing a simple mathematical operation on the
I am running a timer and performing a redirect after a user changes his

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.