i need to get a static controls handle using the ChildWindowFromPoint function. using the WindowFromPoint doesnt work with static controls. anyways here's a snipet of what i got. im getting very strange point results.

invoke GetCursorPos,addr curPos ;get cursor postion and place info in curPos(POINT) structure
invoke WindowFromPoint,curPos.x,curPos.y ;using the points get the handle to the parent window
invoke ChildWindowFromPoint,eax,curPos.x,curPos.y ;then get the child window of parent at mouse position
mov hSpot,eax
Posted on 2002-06-01 02:12:32 by smurf
There is not enought info given to see its fully context, but when i wrote my little 'topmost' tool i used:

invoke ClientToScreen, hWnd, addr PT
invoke WindowFromPoint, PT.x, PT.y

To translate the point to translate the Parent window' point event to screen co-ords. (( I was also using Mouse Captures to recieve messages when off the parrent window as well ~ but this should not be an issue to your needs ))

Posted on 2002-06-01 03:07:17 by NaN
Yeah, in your code, Smurf, I think you need a ScreenToClient after WindowFromPoint (because ChildWindowFromPoint works on client coords)

Posted on 2002-06-01 03:38:56 by eGo
thanks guys. ScreenToClient was what i was looking for. i had given it a try already along with every other point convertion but i must have overlooked something.
Posted on 2002-06-01 05:39:35 by smurf