Reference
Definition
命名空间: Microsoft.UI
WindowId获取与指定 hwnd 对应的值(如果提供的HWND是有效)。
public static WindowId GetWindowIdFromWindow(IntPtr hwnd);
Parameters
hwnd
IntPtr
要为其获取 WindowId 的窗口的句柄。
Returns
如果提供的 hwnd 有效,则标识符对应于指定的 hwnd。 否则为 null。
适用于
| Product | 已引入的版本 |
|---|---|
| WinUI 3 | Windows 应用 SDK 1.0 |