CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Location
    nz
    Posts
    96

    HitTest for Dialog with Mouse

    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

  2. #2
    Join Date
    Jun 1999
    Posts
    319

    Re: HitTest for Dialog with Mouse

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured