Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Figuring out window ID under cursor...

Posted on 1998-04-04
2
Medium Priority
?
227 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
2 Comments
 
LVL 3

Accepted Solution

by:
byang earned 400 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
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…

885 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