Jump to content
  • Advertisement
Sign in to follow this  
GuitarPlayer0912

Changing the cursor to a bitmap

This topic is 4320 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm using c++ and the Win32 API, I just wanted to get that out their first. Anyway, in my map editor, I want to be able to change the standard arrow cursor to a bitmap (in this case a 32 x 32 pixel tile) so the user knows what he/she is placing. Yes, when you select a tile to place, it is highlighted, so you know, but it's much more user friendly to have the cursor replaced by the current tile. Is there any way to do this?

Share this post


Link to post
Share on other sites
Advertisement
I would consider doing this:

Instead of switching the cursor to a bitmap, hide the cursor and have a bitmap follow it. When you place the title show the cursor again. For this operation you should only need ShowCursor() and WM_MOUSEMOVE.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Find some software to make an ani file then use LoadImage() to make it into a cursor used in a call to SetCursor().

Share this post


Link to post
Share on other sites
I know that changing icon file extensions to bmp will show that file as bmp. I tried to change cursor extension to bmp and that also worked. That means that cursor are nothing more than bitmaps :D.
Beside this you can load any custom cursor either from resource file or either from disk. And any cursor can be up to 256 colors if I remember well.

Share this post


Link to post
Share on other sites
Quote:
Original post by streamer
Beside this you can load any custom cursor either from resource file or either from disk. And any cursor can be up to 256 colors if I remember well.
XP, at least, supports true colour alpha-blended cursors.

I'd recommend using a proper tool to convert cursors; Axialis make some great software.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!