I am trying to create an app similar to spy++ in java, in which I can get class/caption/handle of every element which I am taking mouse over. e.g. :
- If we move mouse on task bar, the spy tool shows the info as : Handle : 000100AA Caption : Running applications Class : MSTaskListWClass
- If we take mouse on one of the button of windows calculator(lets say "1") spy tool will show caption : 1
I m already getting foreground window with following code:
GetWindowTextW(GetForegroundWindow(), buffer, MAX_TITLE_LENGTH);
and process name :
Pointer process = OpenProcess(PROCESS_QUERY_INFORMATION
| PROCESS_VM_READ, false, pointer.getValue());
GetModuleBaseNameW(process, null, buffer1, MAX_TITLE_LENGTH);
But i am still not able to get captions and classes for buttons/textboxes. Please help to do the same.