I need to obtain dialog control handle from screen coordinates to display context help for it.
When user right-clicks on dialog item, I process WM_CONTEXTHELP. I have cursor coordinates of clicked area.
Next, I try to detect which item has been clicked.
I call WindowFromPoint. It returns right handles, EXCEPT for static and groupbox controls - in this case it returns dialog handle.
I try to call ChildWindowFromPoint. It returns only groupbox handles even if user clicks on item inside of groupbox (eg, button, static control, etc).
I try to call ChildWindowFromPointEx with all flags - SKIPTRANSPARENT, SKIPDISABLED - it produces the same result.
I cannot use the combination of WindowFromPoint and ChildFromPoint because I cannot obtain static control handle.
I don't want to use WinHelp(... CONTEXTHELP..).
Is there any way to solve this problem except of enumerating all childs, retrieving its coordinates...?