Method GetWindowInfo
GetWindowInfo(nint, ref WindowInfo)
Retrieves information about the specified window.
public static extern bool GetWindowInfo(nint hwnd, ref WindowInfo pwi)
Parameters
hwndnintA handle to the window whose information is to be retrieved.
pwiWindowInfoA reference to a WindowInfo structure that receives the window information. The caller must initialize the
cbSizemember 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.