![]() ![]() map from registry value 32-256 to 0-14, and from there to pixelsĬursorSizeValue = (cursorSizeValue - 2 * baseSize) / baseSize Ĭonst int cursorSize = baseSize + cursorSizeValue * (baseSize / 2) Int cursorSizeValue = cursorSizeSetting.first * m_screen->logicalDpi().first The registry values are dpi-independent, so we need to scale the result. Return QSize(baseSize / 2, baseSize / 2) QWinRegistryKey(HKEY_CURRENT_USER, LR"(Control Panel\Cursors)")Ĭonst int baseSize = screenCursorSize(m_screen).width() / 2 Then the cursor increases with 8 pixels for each step. If a large cursor is set in the accessibility settings, The standard size is 32x32, even though the cursor is actually justġ6 pixels large. Y = ci.ptScreenPos.Y - ((int)icInfo.yHotspot) X = ci.ptScreenPos.X - ((int)icInfo.xHotspot) static Bitmap? CaptureCursor(ref int x, ref int y) Now this code is working but it use default 32x32 size. The idea is scale to mouse cursor bitmap to correct size. How to get correct size of mouse cursor if you are using large cursor. Now the Win10 has this change mouse cursor size feature. I have try: SystemParametersInfo() and cursor bitmap size info. How do i get correct size value of mouse pointer?
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |