About 1,710 results
Open links in new tab
  1. GetDpiForWindow function (winuser.h) - Win32 apps

    Feb 22, 2024 · Returns the dots per inch (dpi) value for the specified window.

  2. GetDpiForWindow() is not declared when compiled using MinGW …

    Mar 17, 2023 · However, it seems that there is no GetDpiForWindow() even though the Windows Documentation said there was. I have tried to build the same program in Visual Studio 2022, and it …

  3. How to build high DPI aware native Windows desktop applications

    May 19, 2021 · The GetDpiForMonitor function returns the DPI value of a monitor. The GetDpiForWindow function returns the DPI value for a window. However, their behavior, and, …

  4. Resize a window in WinUI (part 1: find the DPI) - Ben Stolovitz

    Jun 21, 2025 · Instead, let’s use the native Win32 API, GetDpiForWindow. An easy approach is to use CsWin32, which auto-generates P/ Invoke code for Win32 APIs. (P/ Invoke is C#’s way of calling non …

  5. high-dpi-improvements-for-desktop-applications.md - GitHub

    Jul 15, 2025 · GetDpiForWindow will return the DPI associated with the HWND provided. The answer will depend on the DPI awareness mode of the HWND: Calling GetDpiForSystem is more efficient …

  6. Writing Win32 apps like it's 2020: A DPI-aware resizable wizard

    Jul 30, 2020 · Windows 10 Version 1607 merges these steps into one through its added GetDpiForWindow API. But other than returning the same information in just one function call, it has …

  7. GetDpiForWindow function - win32 library - Dart API - Pub

    API docs for the GetDpiForWindow function from the win32 library, for the Dart programming language.

  8. DPI and device-independent pixels - Win32 apps | Microsoft Learn

    May 24, 2023 · We recommendation that for a desktop app, you use GetDpiForWindow; and for a Universal Windows Platform (UWP) app, use DisplayInformation::LogicalDpi. Although we don't …

  9. Win32 DPI And Monitor Scaling · GitHub

    Aug 29, 2023 · Solution: The problem occurs due to a Windows bug, which causes the new window size to be incorrectly calculated. The bug can be worked around by handling the …

  10. c++ - Compiler can't find DPI related functions - Stack Overflow

    Jun 19, 2021 · I included all the needed headers (windows.h, winuser.h), but the compiler keeps complaining about "GetDpiForWindow" or "AdjustWindowRectExForDpi" not being defined.