3

There is a new option for the End User in Windows 10 Creator's Update Edition. The End User can change properties for an EXE on the compatibility tab to "Override High DPI Scaling Behavior" and set it to System (Enhanced). I tested it and it works well for some classic win32 apps.

I want to to do this by code through an API call or through the manifest. There is no information on that. Is that possible? From the comment I got, it want to clarify that this is a NEW CREATORS UPDATE FEATURE and I particularly want to know how to set the "SYSTEM (ENHANCED)" choice for override feature through manifest or code.

user173399
  • 464
  • 5
  • 21
  • There is too much information on that, google "dpiaware manifest". [Here is one](https://stackoverflow.com/a/13228495/17034). – Hans Passant Mar 17 '18 at 06:25
  • Not really, not on how to set the particular System (Enhanced) setting that the end user gets. – user173399 Mar 17 '18 at 06:51
  • Your link points to an old article. This "System (Enhanced)" feature is latest from Creator's Update and there seems to e no manifest or API for that. – user173399 Mar 17 '18 at 06:58
  • https://blogs.windows.com/buildingapps/2017/04/04/high-dpi-scaling-improvements-desktop-applications-windows-10-creators-update/ – Hans Passant Mar 17 '18 at 07:05
  • That's the article I originally read to know about this feature. But it only describes the End User's solution for using System (Enhanced). It does not give what is the equivalent of it in the Manifest. – user173399 Mar 17 '18 at 08:59
  • The questioner asked about a way to do it with an API call as well which has yet been unanswered anywhere on the internet (proof: search for the symbol I mentioned in my answer below) by anyone until now. – Ted. Aug 08 '18 at 14:19

3 Answers3

4

I found the answer in another SO post: Enhanced system DPI scaling with VS2017

The correct clue is to investigate the new GDI Scaling manifest that is vastly improved in Creator's Update. That is used in System (Enhanced) setting.

None of the answers or comments came close. They kept referring to old articles. Moreover, someone marked the question negative:( Sad.

user173399
  • 464
  • 5
  • 21
3

DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED is a now a valid DPI_AWARENESS_CONTEXT in the latest Windows 10 SDK headers (17134 as of this writing), in windef.h:

define DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED ((DPI_AWARENESS_CONTEXT)-5)

So you should call IsValidDpiAwarenessContext and SetProcessDpiAwarenessContext to take advantage of GDI Scaling at runtime, if you wish to avoid having to do this in the manifest.

This confirms that gdiScaling is mutually exclusive from Per monitor V2.

Ted.
  • 133
  • 6
0

The details are covered in this blog post:

<dpiAware>True/PM</dpiAware>
<dpiAwareness>PerMonitorV2, PerMonitor</dpiAwareness>

For more details on various manifest issues, see Manifest Madness

Chuck Walbourn
  • 38,259
  • 2
  • 58
  • 81
  • This is for DPI Aware applications. The new "System (Enhanced)" feature is for DPI Unaware applications to work well on High DPI. Anyway, I'm close to the solution and will post the answer. – user173399 Mar 17 '18 at 09:00