Win32, x64


To instruct ClearWin+ to modify the settings for DPI awareness available in Windows 8.1 and above.




ClearWin+ now makes use of the "DPI awareness" features first available with Windows 8.1. This means that, where possible, ClearWin+ will take advantage of the Windows API features designed to handle high DPI display settings which otherwise can lead to clipped text and blurry images.

This means that, where possible, ClearWin+ now makes the call "SetProcessDpiAwareness(Process_System_DPI_Aware)" in its initialisation process. Programmers who need to use values other than Process_System_DPI_Aware (which has the value 1) can do so via this function.

VALUE should take one of the following:

  • 0 - DPI unaware - the default for before Windows 8.1. This app does not scale for DPI changes and is always assumed to have a scale factor of 100% (96 DPI). It will be automatically scaled by the system on any other DPI setting.
  • 1 - System DPI aware - the ClearWin+ default for Windows 8.1 and above. This app does not scale for DPI changes. It will query for the DPI once and use that value for the lifetime of the app. If the DPI changes, the app will not adjust to the new DPI value. It will be automatically scaled up or down by the system when the DPI changes from the system value.
  • 2 - Per monitor DPI aware. This app checks for the DPI when it is created and adjusts the scale factor whenever the DPI changes. These applications are not automatically scaled by the system.

The Windows API function SETDPIAWARENESS@ is only effective on its first call so a call to SETDPIAWARENESS@ must be placed before any other calls to the ClearWin+ library.

Return value

0 - success
z'80004001' (E_NOTIMPL), OS does not support function
z'80070057' (E_INVALIDARG), Invalid value
z'80070005' (E_ACCESSDENIED), if the awareness value has already been set


Added to FTN95 at version 7.10



Copyright © 1999-2022 Silverfrost Limited