private static DpiAwarenessContextHandle GetProcessDpiAwarenessContext(IntPtr hWnd) { PROCESS_DPI_AWARENESS processDpiAwareneess = ProcessDpiAwarenessHelper.GetProcessDpiAwareness(hWnd); return(GetProcessDpiAwarenessContext(processDpiAwareneess)); }
/// <summary> /// Equivalent to <see cref="GetProcessDpiAwareness(IntPtr)"/> /// </summary> /// <param name="hWnd">Handle to the window being queried</param> /// <returns>The <see cref="DpiAwarenessContextValue"/> enum corresponding to the PROCESS_DPI_AWARENESS value of the <paramref name="hWnd"/></returns> /// <remarks>See remarks for <see cref="GetProcessDpiAwareness(IntPtr)"/></remarks> internal static DpiAwarenessContextValue GetProcessDpiAwarenessContextValue(IntPtr hWnd) { var dpiAwarenessContext = ProcessDpiAwarenessHelper.GetProcessDpiAwareness(hWnd); return((DpiAwarenessContextValue)DpiAwarenessContextHelper.GetProcessDpiAwarenessContext(dpiAwarenessContext)); }
/// <summary> /// Gets the PROCESS_DPI_AWARENESS enum value of the current process /// </summary> /// <returns>PROCESS_DPI_AWARENESS value of the current process</returns> /// <remarks> /// The only values returned by this method are PROCESS_SYSTEM_DPI_AWARE or /// PROCESS_DPI_UNAWARE /// </remarks> internal static PROCESS_DPI_AWARENESS GetLegacyProcessDpiAwareness() { return(ProcessDpiAwarenessHelper.GetLegacyProcessDpiAwareness()); }
/// <summary> /// Gets the PROCESS_DPI_AWARENESS enum value of the process associated /// with a window /// </summary> /// <param name="hWnd">Handle to the window being queried</param> /// <returns>The PROCESS_DPI_AWARNESS value</returns> /// <remarks> /// If the process associated with the HWND cannot be queried for its /// PROCESS_DPI_AWARENESS value, then the value is obtained from the /// current process' DPI awareness information. /// </remarks> internal static PROCESS_DPI_AWARENESS GetProcessDpiAwareness(IntPtr hWnd) { return(ProcessDpiAwarenessHelper.GetProcessDpiAwareness(hWnd)); }