My goal is to write an application that will be able to capture from another Microsoft application (e.g. MS Excel):
- The picture of the application window - one picture per application window if there are more windows.
- The picture of all icons when the mouse is hovered over the icons including the picture of the icons when the mouse is pressed.
- The picture of the tooltip that will show next to the icon.
- The picture of the mouse cursor if there is a specific cursor over an icon or over different areas of the application window.
What is the best practice?
Using UIA I can get all the coordinates of all icons on the window. Then I can set the mouse position over the icons and capture the icons one-by-one. The program will wait about two seconds over each icon to capture the tooltip of the icon. Then I can tell the user to click each icon and capture the picture of the pressed icons. At the end I will move the mouse over the whole application window and detect any changes in the mouse pointer. Is there any better way?
There is already a question about capturing the tooltips but with no solution: Get Win32 legacy control's tooltip text programmatically