Solved

Figuring out window ID under cursor...

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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.…
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…
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…

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