How to set monitor scaling to recommended or desired scaling with c++ ?

Jaka Kostanjevec 0 Reputation points
2023-08-24T10:16:37.58+00:00

I am trying to set scaling to windows recommended scaling or to desired one (100%,150%,...) for monitor in C++. I have monitor handles (type: HMONITOR). Is that enough or do I need anything else how would I set scaling from code.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,757 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,913 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 88,541 Reputation points
    2023-08-24T10:27:34.51+00:00

    You can change scaling with SystemParametersInfo and SPI_SETLOGICALDPIOVERRIDE

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.