Maxwell
Maxwell

Reputation: 916

How to detect the mouse cursor size across all platforms in C++?

Is there a way to detect the mouse cursor size in C++ across all platforms? I know there is a way to do it with WINAPI, just how do you do it without using WINAPI?

Upvotes: 0

Views: 265

Answers (1)

jhoffman0x
jhoffman0x

Reputation: 795

Is there a way to detect the mouse cursor size in C++ across all platforms?

No. C++ doesn't have any concept of a cursor (this is a function of the OS). However, there are libraries that allow you to interact with the OS in a cross platform way. These libraries still use platform specific APIs under the hood, but they provide a convenient abstraction for you.

Depending on your other requirements, Qt might be helpful. After a quick skim of the QCursor class, it looks like you can't get the size of the cursor, but you can set it (they recommend setting it to 32x32 because it's supported on all platforms).

Upvotes: 2

Related Questions