Solved

Figuring out window ID under cursor...

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
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 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…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

707 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