title: Find menu item based on mouse position in C++
body: <p>I am trying to get the menu item from another application.</p>
  
  <p>I can do this by manually getting the handle to the main menu and loop through its sub menu. But it is very difficult to find out how many levels of sub menus are there for a given menu. For example if we look at outlook view menu some thing like this, View -> Arrange by -> Current View -> Messages.</p>
  
  <p>So i decided to get the menu item based on mouse position. But i cant find a way to do that.</p>
  
  <p>Please suggest some idea to do this.</p>