Win32Interop.GetWindowIdFromWindow(IntPtr) 方法

Reference

Definition

命名空间: Microsoft.UI

如果提供的 HWND 有效,则获取与指定的 hwnd 对应的 WindowId

public static WindowId GetWindowIdFromWindow(IntPtr hwnd);

Parameters

hwnd IntPtr

要为其获取 WindowId 的窗口的句柄。

Returns

WindowId

如果提供的 hwnd 有效,则标识符对应于指定的 hwnd。 否则为 null

适用于

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

另请参阅