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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:43:33+00:00 2026-05-14T22:43:33+00:00

So, I have a plugin to an MFC program. I’m using a mouse event

  • 0

So, I have a plugin to an MFC program. I’m using a mouse event hook (from SetWindowsHookEx) to capture clicks. The host application can have any number of (possibly overlapping) child windows open, but I only want to intercept clicks in a particular child window.

Is there a way to figure out in the hook proc which of the child windows would process the click? I guess it’s something like enumerate all child windows, looking at Z-order, but I’m very unfamiliar with the MFC/Win32 libraries, and I’m not able to find any good discussion about how to enumerate all children and calculate which is topmost.

  • 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-05-14T22:43:34+00:00Added an answer on May 14, 2026 at 10:43 pm

    Maybe the WindowFromPoint API function fits the bill?

    Retrieves a handle to the window that contains the specified point.

    The documentation does not explicitly mention Z ordering, but I can assure you from first-hand experience that “contains” implicitly means that no other window is in front.

    There are several more of these, with slightly different behaviour: ChildWindowFromPoint, ChildWindowFromPointEx and RealChildWindowFromPoint.

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

Sidebar

Related Questions

I have plugin that doesnt start(from dropins, with eclipse -clean), however its not even
I have created a plugin, that ckecks authorization status and gives access for using
I have facebox plugin to my jQuery, to make lightbox for me. I made
I have this plugin in the plugins directory within the admin module directory. So,
I have a Firefox plugin that adds some optional features to my web app.
How to access view inside plugin. For example i have language plugin and i
I'm learning how to write a scriptable ActiveX control. My goal is to have
Currently I have a pure silverlight website with navigation. Im worried about the customers
I've got MongoKit structure like this: structure = { ... 'plugin': { 'id': unicode,
I'm having a conundrum here, and I'm not even sure it's possible. I'm developing

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.