User32GetClientRect(IntPtr, Rectangle) Method

Retrieves the coordinates of a window's client area.

The client coordinates specify the upper-left and lower-right corners of the client area.

Because client coordinates are relative to the upper-left corner of a window's client area, the coordinates of the upper-left corner are (0,0).

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", SetLastError = true)]
public static bool GetClientRect(
	IntPtr hWnd,
	out Rectangle refRect
)

Parameters

hWnd  IntPtr
A handle to the window whose client coordinates are to be retrieved.
refRect  Rectangle
A pointer to a Rectangle structure that receives the client coordinates.

The left and top members are zero. The right and bottom members contain the width and height of the window.

Return Value

Boolean
if the function succeeds, otherwise.

Remarks

See Also