Link Search Menu Expand Document

Fix Scaling and Incorrect Coordinates - Windows

Screen Capturing SDK sample in Windows demonstrating ‘Fix Scaling and Incorrect Coordinates’

## How to Solve Issues with Scaling

#### Issues to be solved: 

- incorrect coordinates for mouse cursor when recording video from screen.
- incorrect scaling or incorrect area on Windows with non-standard DPI (High DPI) settings or display or screen scaling enabled.

#### Solution

For Windows 10: Screen Capturing SDK automatically checks scaling and DPI settings and adjusts coordinates when needed.
For Windows XP to Windows 8: need to add "manifest" file to enable "dpi awareness" flag for your application. With this flag Windows will adjust pass correct coordinates to ByteScout Screen Capturing SDK and to your application.

IMPORTANT 1: when screen DPI or scaling settings are changed (from 100% to lets say 125%) then the user MUST log out and then log in (or restart the machine) for the application to work correctly.

IMPORTANT 2: the application that uses SDK has to declare itself as "DPI Aware". After this the application will get correct coordinates from Windows. 

HOW TO ADD "DPI Awareness" FLAG: 

Solution from Microsoft:

From Stackoverflow (different Visual Studio versions):

Now, to make ScreenCapturingConsoleTest C++ application DPI aware, I have added additional Manifest file (in the project the file is called manifest.xml). You have to add this in the ManifestTool, like in the image:

In Visual Studio 2005 or later you can't explicitly add manifest file to the project. You'll have to do it manually. The explanation is here:

For C++ apps, starting from VS 2010, you can add manifest files directly from the project in VS. It will be embedded in the final executable.


You can check it with SysInternals Process Explorer ( 
Enable and select the "DPI Awareness Column". If your app is "DPI Aware" then it will display "System Aware" or "Per Monitor Aware". If it is not dpi aware then it will display "Unaware".

Download Source Code (.zip)

Return to the previous page Explore Screen Capturing SDK

Copyright © 2016 - 2021 ByteScout