private static DpiAwarenessContextHandle GetProcessDpiAwarenessContext(IntPtr hWnd)
            {
                PROCESS_DPI_AWARENESS processDpiAwareneess =
                    ProcessDpiAwarenessHelper.GetProcessDpiAwareness(hWnd);

                return(GetProcessDpiAwarenessContext(processDpiAwareneess));
            }
예제 #2
0
파일: DpiUtil.cs 프로젝트: beda2280/wpf-1
        /// <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));
        }
예제 #3
0
파일: DpiUtil.cs 프로젝트: beda2280/wpf-1
 /// <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());
 }
예제 #4
0
파일: DpiUtil.cs 프로젝트: beda2280/wpf-1
 /// <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));
 }