title: Enable user to select control/window from another process
body: <p>How can I enable user to select a control from any window? Something like inspect.exe or WinySpy++ can do (see screenshot).</p>
  
  <p><img src="https://i.stack.imgur.com/dwKeh.png" alt="enter image description here"></p>
  
  <p>EDIT:
  By "select a control" I mean how can I get handle of the control under the mouse pointer so that I can then do something with it (e.g. draw box around it, get it's position and name). I know I need to use WinAPI, just don't know where to start (how to get handle of the control under the mouse pointer).</p>