Click to See Complete Forum and Search --> : HitTest for Dialog with Mouse


Colin Davies
June 28th, 1999, 09:41 PM
Hi,
I need to dettect if the mouse is over my Dialog App Client area (including controls) or not, simmilar to the NcHitTest(CPoint point)message hamdler. Either by a Message Handler or A function call,
Ok How do I do it ?

Regards and TIA
Colin Davies

At the Mount

Fabi Pantera
June 29th, 1999, 12:24 AM
If you want to retrieve all the messages from mouse, even if your dialog is not the one that get the messages, you need a hook.
Anyway you can make something stupid like setting a timer which get the mouse position (GetCursorPos). COnvert this point near to your dialog coordinates with ScreenToClient. After this make a CRect::PtInRect with your dialog rect and this point.
Let me know if this helps you.
Best regards,
Faby