Increase Cursor Size on Entire Desktop

久未见 提交于 2019-12-02 17:42:20

问题


First of all, please put aside notions of "Your application shouldn't do this". This is exactly what the people purchasing this software will be expecting.

How can I, system-wide, increase the size of the mouse cursor? I'd have to increase all mouse cursors too, so I don't think SetCursor would do the trick, at least not in any nice, clean way.

And I can't use the Form's Cursor Size as detailed here, as this would only affect the cursor when it's active on the form.

I see that there are "Extra Large" Mouse Cursors available in Windows' Ease-of-Access Centre, so there must be a way...

Any ideas?


回答1:


Any solution to this is going to get really hairy because of two things: 1. Any application can change the cursor to anything else on its own 2. Cursors are at most 32x32 pixels

If an application changes the cursor to something that is 32x32 pixels, there's no way to make that any larger.

The Extra Large cursors are just just using more of the 32x32 pixels a cursor can use. The default ones are just using the top-left more-or-less quadrant of the 32x32.

You might be able to constantly Retrieve the current cursor using http://msdn.microsoft.com/en-us/library/windows/desktop/ms648388(v=vs.85).aspx

and then paint ontop of all windows that cursor doubled in size by stretching the image, then set the cursor to some empty cursor file. This is horribly hacky and will likely cause tons of flickering and compatibility problems.



来源:https://stackoverflow.com/questions/11507945/increase-cursor-size-on-entire-desktop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!