How to check control over control in dlg
:rolleyes:
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.
Re: How to check control over control in dlg
From MSDN:
Quote:
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.