title: C++ Windows API - How to retrieve font scaling percentage on Windows 10
body: <p>My goal is to be able to adjust the font size at runtime in a C++ app, based on the monitor resolution.</p>
  <p>In <a href="https://stackoverflow.com/questions/64785427/c-windows-api-how-to-retrieve-font-scaling-percentage">this question</a>, it's explained how to get the font scaling percentage, but the suggested function <code>GetScaleFactorForMonitor</code> requires Windows 8.1. My C++ app must run on Windows 7 or higher. I have tried several proposed solutions based on getting the ratio of device caps parameters, but they all get 1.0 on a Windows 10 system where the Windows &quot;Make everything bigger&quot; setting is 150%.</p>
  <p>Per the MS docs, Visual Studio is adding &quot;dpiAware&quot; to the manifest (this is a setting I can change). Probably because the app is being built on a Windows 7 system, the VS-generated manifest does not include Windows 10 as a supported O/S. If I add the lines</p>
  <pre><code>       &lt;!--This Id value indicates the application supports Windows 10, Windows Server 2016 and Windows Server 2019--&gt;
        &lt;supportedOS Id=&quot;{{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}&quot;/&gt;
  </code></pre>
  <p>to the manifest, when I run the app on Windows 10, I get a &quot;side-by-side&quot; error.</p>
  <p>How can I get this &quot;make everything bigger&quot; and the &quot;make text bigger&quot; settings on a Windows 7 or 10 system?</p>
  <p>Build system: 64-bit Windows 7, Visual Studio 2019 16.7.7  Run system: Windows 7 or later</p>