How to check current mouse position is desktop window?

  • Thread starter Thread starter harvie wang
  • Start date Start date
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
 
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
 
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
 
Hello Michael,

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