CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: How to check control over control in dlg

  1. #1
    Join Date
    Jun 1999
    Location
    Germany
    Posts
    46

    Question How to check control over control in dlg



    Dear gurus,

    in my dialog I move a control to a point. Then perhaps I move another control to another or the same point. In case of the same point I have to deny this. But I don't know how to check if at this point is already a control. If I use ChildWindowFromPoint() I only find the last window. Any suggestions? Thanks in advance.

  2. #2
    Join Date
    Apr 1999
    Posts
    3,585

    Re: How to check control over control in dlg

    From MSDN:
    More than one window may contain the given point. However, this function returns only the CWnd* of the first window encountered that contains the point.
    You can define an array of CRects that contain the control positions. As you move a control, update the array. The next time you want to move a control, you can check the array to see if the point lies within one of the CRects.
    Gort...Klaatu, Barada Nikto!

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)