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!
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