Is there a scaling support for cursors

Igor Korot 56 Reputation points
2023-04-08T13:35:33.1066667+00:00

Hi, All,If I create a cursor from resource, will it be properly scaled if I move my window to a monitor with the different scaling?Or I will have to create multiple icons and switch cursors based on dpi change message?Please advice Thank you.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,772 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 90,191 Reputation points
    2023-04-09T07:38:02.8566667+00:00

    Before, cursors were limited to 32x32

    But now you can add several formats inside the .cur (32x32, 48x48... 128x128...), like Aero cursors in C:\Windows\Cursors, which will be chosen according to DPI scale or when cursor size is changed (HKEY_CURRENT_USER\SOFTWARE\Microsoft\Accessibility CursorSize or HKEY_CURRENT_USER\Control Panel\Cursors CursorBaseSize)

    There is also a recent API : SetThreadCursorCreationScaling but I cannot test it (for OS >= Windows 11 21H2)


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.