Solved

Figuring out window ID under cursor...

Posted on 1998-04-04
2
215 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 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now