Control handle under the mouse cursor

D

Danny

Hi

I need to get the handle to the windows control that is directly below the
mouse. This must work on any windows application, win32 and dotnet forms.
The reason is I would like to highlight the window's bounderies if possible,
and change the text in controls that allow it.

For example , when I hover the mouse over a win32 application with edit
boxes on, am going to drawy around the text box ( some how) not got that bit
yet!

I guess am going to have to pinvoke out to set/get text for text boxes as
well.

thanks
danny
 
M

Michael Nemtsev

Hello Danny,

Look at functions like: WindowFromPoint, ChildWindowFromPoint, GetCursorPos,
GetClassName

It helps you to get form and control under you cursor and that analizing
type of class send messages changing frame

D> I need to get the handle to the windows control that is directly
D> below the mouse. This must work on any windows application, win32
D> and dotnet forms. The reason is I would like to highlight the
D> window's bounderies if possible, and change the text in controls that
D> allow it.
D>
D> For example , when I hover the mouse over a win32 application with
D> edit boxes on, am going to drawy around the text box ( some how) not
D> got that bit yet!
D>
D> I guess am going to have to pinvoke out to set/get text for text
D> boxes as well.

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top