Table of Contents

Method GetWindowInfo

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

GetWindowInfo(nint, ref WindowInfo)

Retrieves information about the specified window.

public static extern bool GetWindowInfo(nint hwnd, ref WindowInfo pwi)

Parameters

hwnd nint

A handle to the window whose information is to be retrieved.

pwi WindowInfo

A reference to a WindowInfo structure that receives the window information. The caller must initialize the cbSize member of this structure to the size of the structure before calling this method.

Returns

bool

true if the function succeeds; otherwise, false. Call GetLastWin32Error() to retrieve extended error information if the function fails.

Remarks

This method is a wrapper for the native GetWindowInfo function in the Windows API. It retrieves information such as the window's dimensions, style, and extended style.