I am a writing an automation program for another application. It would be very helpful for my program to see what mouse pointer the other program is using. For example, my program would know that the other program is busy by checking/watching to see if the mouse pointer for that window is set to the hourglass. The other application is a Java application but I don't think that should matter.
Quote from <a href="
http://support.microsoft.com/kb/131991">
http://support.microsoft.com/kb/131991</
a>
"In a Windows-based application, a window is always created based on a window class. The window class identifies several characteristics of the windows based on it, including the default mouse pointer (cursor). In some cases, an application may want to change the pointer associated with certain windows that it creates."
More related information can be found at the above link. I am programming my program in Visual Basic 6 but the answer doesn't have to be related to that. Hooks may be a solution but I've used Spy++ and did not see any messages about changing the cursor/pointer. System wide mouse hook maybe? I looked into this already as well, but did not find any worthwhile results.
The program may be changing the mouse pointer to an hourglass using the method described below (also on the page linked above.)
"To show the standard hourglass pointer, an application can call the CCmdTarget::BeginWaitCurso
r(), which displays the hourglass, and call CmdTarget::EndWaitCursor()
to revert back to the default pointer."
So, how can I get mouse pointer of a top level window in a different process programmatically?
Start Free Trial