Jump to content
  • Advertisement
Sign in to follow this  

Custom cursors stuck at 32x32

This topic is 4163 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

Hi I'm trying to change my cursor to a custom one whenever a certain button on a toolbar is clicked. I'm using plain old WinAPI. This is my process. CurTest.rc
MYCUR CURSOR "../Images/MyCur.cur"

#define MYCUR 100


// .. rest of program

/* In the WndProc */
    return 0;

No matter what size I actually make the cursor when I design it, it always comes out as a 32x32 image in my program and it looks really bad. I haven't really used cursors before, so I'm kind of new at this. Anyone have an idea on how to fix this?

Share this post

Link to post
Share on other sites
From MSDN on the subject (from the CreateCursor() reference):

The nWidth and nHeight parameters must specify a width and height that are supported by the current display driver, because the system cannot create cursors of other sizes. To determine the width and height supported by the display driver, use the GetSystemMetrics function, specifying the SM_CXCURSOR or SM_CYCURSOR value.

So you can probably only have 32x32 cursors. Bigger is not possible, smaller by having a 32x32 image but the unused areas filled with transparency.


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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!