Solved

Figuring out window ID under cursor...

Posted on 1998-04-04
2
221 Views
Last Modified: 2013-12-03
I have an app with several Digital Meters on a dialog. I want to be able to track the mouse cursor when the user clicks on one (doesn't have any click events) and get its control command id. I want to do this w/o subclassing if possible. I'm now using the OnParentNotify event to process the click (and I'm translating to figure out double-clicks). Is this possible? Thanks in advance...
0
Comment
Question by:maknight
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
byang earned 100 total points
ID: 1412534
You should use WindowFromPoint/ChildWindowFromPoint API calls.
CWnd has them too.

0
 

Author Comment

by:maknight
ID: 1412535
That's IT!!! Thanks. Man, I don't see how I overlooked that in CWnd. I looked over that several times. Thanks, again...
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question