Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #462 from vatsan-madhavan/unawaregdiscaled
Browse files Browse the repository at this point in the history
Add DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED
  • Loading branch information
AArnott committed Jun 27, 2020
2 parents 9fd1f9f + 0c32695 commit b0cb7c1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/User32/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,5 @@ static readonly PInvoke.User32.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE -> System
static readonly PInvoke.User32.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 -> System.IntPtr
static readonly PInvoke.User32.DPI_AWARENESS_CONTEXT_SYSTEM_AWARE -> System.IntPtr
static readonly PInvoke.User32.DPI_AWARENESS_CONTEXT_UNAWARE -> System.IntPtr
static readonly PInvoke.User32.DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED -> System.IntPtr
static readonly PInvoke.User32.SafeCursorHandle.Null -> PInvoke.User32.SafeCursorHandle
12 changes: 12 additions & 0 deletions src/User32/User32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,18 @@ public static partial class User32
/// <remarks>DPI_AWARENESS_CONTEXT values should never be compared directly. Instead, use AreDpiAwarenessContextsEqual function</remarks>
public static readonly IntPtr DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 = new IntPtr(-4);

/// <summary>
/// DPI unaware with improved quality of GDI-based content. This mode behaves similarly to <see cref="DPI_AWARENESS_CONTEXT_UNAWARE" />,
/// but also enables the system to automatically improve the rendering quality of text and other GDI-based primitives when
/// the window is displayed on a high-DPI monitor.
/// </summary>
/// <remarks>
/// <see cref="DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED" /> was introduced in the October 2018 update
/// of Windows 10 (also known as version 1809).
/// For more details, see <see href="https://blogs.windows.com/buildingapps/2017/05/19/improving-high-dpi-experience-gdi-based-desktop-apps/#Uwv9gY1SvpbgQ4dK.97">Improving the high-DPI experience in GDI-based Desktop apps</see>
/// </remarks>
public static readonly IntPtr DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED = new IntPtr(-5);

/// <summary>
/// A special windows handle used to indicate to <see cref="SendMessage(IntPtr, WindowMessage, IntPtr, IntPtr)" />
/// that the message is sent to all top-level windows in the system, including disabled or invisible unowned windows,
Expand Down

0 comments on commit b0cb7c1

Please sign in to comment.