How to check current mouse position is desktop window?

H

harvie wang

Hi,

I create a system mouse hook, to get mouse position and click events.
use GetDesktopWiindow and WindowFromPoint(x,y) to get window handle in my
hook proc.
Click mouse on desktop window and print the window handle which i got in
hook proc.
GetDesktopwindow() == 65557;
WindowFromPoint(x,y) == 65700;
but when i use spy++ to get the desktop window handle, it's return 0x100A4
or 0x100A2.
what's matter?

best wish,

harvie

2006-6-2
 
G

Guest

0x100A4 is a hexadecimal presentaion of the 65700
Hi,

I create a system mouse hook, to get mouse position and click events.
use GetDesktopWiindow and WindowFromPoint(x,y) to get window handle in my
hook proc.
Click mouse on desktop window and print the window handle which i got in
hook proc.
GetDesktopwindow() == 65557;
WindowFromPoint(x,y) == 65700;
but when i use spy++ to get the desktop window handle, it's return 0x100A4
or 0x100A2.
what's matter?

--
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 Nietzsche
 
H

harvie wang

Hello Michael,
thanks!
why GetDesktopWindow return window handle do not equal to WindowFromPoint(x,y)?
I click the mouse on desktop.

harvie

2006-6-27
 
H

harvie wang

Hello Michael,

Is the desktop window handle a const value (100A4)?
why GetDesktopwindow can not return the correct value?
 

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

Top