Accessing the Windows Spinning Circle Pointer.

Ok so I have an idea for a project that I'm working on does anyone have any thoughts on how I could do something along these lines?

What I want to do is great a large spinning disc / light that will turn on and turn around when my computer is "processing something" or whenever the mouse is doing the rotating blue windows circle icon as the pointer. basically a fun way for everyone in my office to see that my computer is crunching some stuff while I'm up getting coffee or something.

My main question is how to get the proper signal from windows to start my device. I feel fine with building the device, controlling the light, motor, ect. and all the electronics hardware and wiring. But I haven't the slightest clue on how i could interpret that state from my desktop and translate it to my arduino to signal on/off.

You’re probably better of asking a question like this at e.g. Msdn forums or another dedicated Windows programming forum.

The application under the mouse has to decide which mouse pointer to display. The operating system provides some support but that is done in cooperation with the application. In order to determine which pointer is displayed you will have to develop a system wide hook.

Or, you could base your project on the CPU load which is a bit easier to determine.

Yeah I'm rethink this towards some sort of CPU / RAM usage threshold that triggers on. Seems much easier to implement.

I would have thought that WINAPI GetCursorInfo() will give you the required info. Determining CPU load sounds like hard work.

Martin-X:
I would have thought that WINAPI GetCursorInfo() will give you the required info.

What part of CURSORINFO is relevant?

Determining CPU load sounds like hard work.

https://www.google.com/search?q=windows+api+cpu+usage

The entire first page of hits.

Would hCursor not give a consistent value when the App busy cursor is visible?
Looking at the StackOverflow link on the Gurgle results, the top answer describes the Performance Data Helper library (PDH) as “a bit unintuitive”.

We’re drifting a bit off-topic, so the recommendation to look at MSDN gets my vote.

Martin-X:
Would hCursor not give a consistent value when the App busy cursor is visible?

Handles are process local. Even if the values are consistent some of time there is no guarantee they will be consistent all of the time.

Looking at the StackOverflow link on the Gurgle results, the top answer describes the Performance Data Helper library (PDH) as “a bit unintuitive”.

WMI is a simpler choice (SQL-like queries). In any case, there are multiple ways to get at the data.