Share via


Win32Interop.GetWindowIdFromWindow(IntPtr) 方法

參考

定義

命名空間:Microsoft.UI

如果提供的 HWND 有效,則取得與指定 hwnd 對應的 WindowId

public static WindowId GetWindowIdFromWindow(IntPtr hwnd);

參數

hwndIntPtr

要取得 WindowId 視窗的處理常式

傳回

WindowId

如果提供的 hwnd 有效,則與指定的 hwnd 對應的識別碼。 否則為 null

適用於

Products 導入
WinUI 3 Windows App SDK 1.0

另請參閱