Win32Interop.GetWindowIdFromWindow(IntPtr) 方法

参考

定义

命名空间:Microsoft.UI

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

public static WindowId GetWindowIdFromWindow(IntPtr hwnd);

参数

hwndIntPtr

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

返回

WindowId

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

适用于

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

请参阅