Monday, April 25, 2011

Any limitations for custom cursors using CreateIconIndirect?

My Windows application creates custom cursors at run time by using the WIN API CreateIconIndirect() function. The size of the cursor is dynamic and may sometimes be much larger than average (the icon being wider than 300 pixels).

This seems to cause problems when using the application via Remote Desktop (and other similar 3rd party products).

Is there some kind of practical limit (either real or perceived) to the size of the cursor icons that can be used in a Windows application?

From stackoverflow
  • GetSystemMetrics(SM_CXCURSOR) and GetSystemMetrics(SM_CYCURSOR) tell you the maximum size

    JV : Hmm, the documentation is a tad unclear. In "Windows XP icon and cursor support" ( it says "Although cursors can, in theory, be any size, the system imposes a standard size that is exposed by means of the SM_CXCURSOR and SM_CYCURSOR values."
    Jimmy J : You might lose hardware acceleration...


Post a Comment