Win32Interop.GetDisplayIdFromMonitor(IntPtr) 方法

Reference

Definition

命名空间: Microsoft.UI

如果提供的 hmonitor 有效,获取与指定 hmonitor 对应的 DisplayId

public static DisplayId GetDisplayIdFromMonitor(IntPtr hmonitor);

Parameters

hmonitor IntPtr

要为其获取 DisplayId 的显示监视器的句柄。

Returns

DisplayId

指定的 hmonitor 对应的显示监视器标识符,如果提供的 hmonitor 有效。 否则为 null

适用于

Product 已引入的版本
WinUI 3 Windows 应用 SDK 1.0

另请参阅