Largest Windows Cursor Size

I have a 128x128 size pointer, but when I loaded LoadKursor and showed it, it only had 32x32. Which API can do it right? MS seems to be resizing it. Thanks.

+2
source share
3 answers

Windows XP does not contain system cursors larger than 32x32. (If larger cursors were enabled, they would stretch to 32x32 when the standard APIs loaded cursors.)

For high DPI systems, Windows XP set the values โ€‹โ€‹of SM_CXCURSOR and SM_CYCURSOR to 64x64 pixels. This size setting is designed to prevent the mouse pointer from disappearing because it is too small to be used efficiently. Although other aspects of the DPI system scale, the mouse pointer does not scale. Microsoft is not trying to provide DPI-independent size for the mouse pointer.

The system also provides the SetSystemCursor API function, which you can use to change the system cursor for certain categories. You can use this function to position the cursor of any size. However, you must call the function programmatically, and you can only use it to set the cursor for a specific category. You cannot use it so that all cursors in the system are the same size.

http://support.microsoft.com/kb/307213

+3
source

Do not use LoadCursor, use LoadImage () instead.

+2
source

SM_CXCURSOR on SM_CYCURSOR is the only cursor size that the system can currently use. Use GetSystemMetrics to find out these values.

+1
source

Source: https://habr.com/ru/post/952204/


All Articles