Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Getting the images for allegro's system cursors

This thread is locked; no one can reply to it. rss feed Print
Getting the images for allegro's system cursors
Edgar Reynaldo
Member #8,592
May 2007
avatar

Hi peeps!

Just wondering, is it feasible to draw the current mouse cursor onto a bitmap somehow? It's not currently implemented. I want to grab the system mouse cursor images so I can draw them for a user to select using its icon. It's for a demo program. It looks like on Windows it is stored as an HICON. Haven't explored enough to know about the other platforms though.

Is anyone else interested in having some kind of option to draw the mouse pointer onto an ALLEGRO_BITMAP in the A5 API?

Bruce Pascoe
Member #15,931
April 2015
avatar

Hm, it's a neat feature idea, but seems a little out of Allegro's scope.

Edgar Reynaldo
Member #8,592
May 2007
avatar

Elias
Member #358
May 2000

A5 allows custom cursors (al_create_mouse_cursor) just like A4. That's the closest you can get to grabbing system cursors though. I think this feature would not be possible in general since some cursor themes have animated cursors.

--
"Either help out or stop whining" - Evert

Mark Oates
Member #1,146
March 2001
avatar

You mean like changing the cursor to a pre-defined system cursor, like pointing-finger, resize arrows, etc.?

Edgar Reynaldo
Member #8,592
May 2007
avatar

Yes, you can change the cursor at will, even to system defined cursors, but you can't get the image out of allegro. And a screenshot never captures the cursor, only the desktop, so even if I wanted to grab the cursors manually, I still can't. :-/

Go to: