Is this the correct way to use PtInRect? I can't get it to work! Why is the syntax of PtInRect here different than what MS has on their site? invoke PtInRect, ADDR rcMyRect, pt.x, pt.y .if eax != 0 ; The point is in the rectangle! return 0 .endif Thank You!
Posted on 2000-12-27 17:50:00 by xtreme
I got it to work. I was obtaining the mouse position in screen coord. instead of window coord. The code should be: mov eax,lParam and eax,0ffffh mov pt.x,eax mov eax,lParam shr eax,16 mov pt.y,eax invoke PtInRect, ADDR rcMyRect, pt.x, pt.y .if eax != 0 ; Point is in rectangle return 0 .endif
Posted on 2000-12-27 19:09:00 by xtreme