Table of Contents

Struct User32.Types.HWND

Namespace
Xui.Runtime.Windows.Win32
Assembly
Xui.Runtime.Windows.dll
public struct User32.Types.HWND
Inherited Members

Constructors

HWND(nint)

public HWND(nint value)

Parameters

value nint

Fields

HWND_NOTOPMOST

public static readonly User32.Types.HWND HWND_NOTOPMOST

Field Value

User32.Types.HWND

HWND_TOPMOST

public static readonly User32.Types.HWND HWND_TOPMOST

Field Value

User32.Types.HWND

value

public nint value

Field Value

nint

Properties

DPI

Gets the DPI scale for this window. 1.0 = 100% DPI (96 DPI), 2.0 = 200% DPI (192 DPI).

public uint DPI { get; }

Property Value

uint

DPIScale

public NFloat DPIScale { get; }

Property Value

NFloat

IsMaximized

public bool IsMaximized { get; }

Property Value

bool

Value

public nint Value { get; }

Property Value

nint

Methods

BeginPaint(ref PAINTSTRUCT)

public Types.HDC BeginPaint(ref User32.PAINTSTRUCT lpPaint)

Parameters

lpPaint User32.PAINTSTRUCT

Returns

Types.HDC

BeginPaint(HWND, ref PAINTSTRUCT)

public static Types.HDC BeginPaint(User32.Types.HWND hWnd, ref User32.PAINTSTRUCT lpPaint)

Parameters

hWnd User32.Types.HWND
lpPaint User32.PAINTSTRUCT

Returns

Types.HDC

CaptureMouse()

public User32.Types.HWND CaptureMouse()

Returns

User32.Types.HWND

DefWindowProc(HWND, WindowMessage, WPARAM, LPARAM)

public static extern Types.LRESULT DefWindowProc(User32.Types.HWND hWnd, User32.WindowMessage uMsg, Types.WPARAM wParam, Types.LPARAM lParam)

Parameters

hWnd User32.Types.HWND
uMsg User32.WindowMessage
wParam Types.WPARAM
lParam Types.LPARAM

Returns

Types.LRESULT

DefWindowProc(WindowMessage, WPARAM, LPARAM)

public Types.LRESULT DefWindowProc(User32.WindowMessage uMsg, Types.WPARAM wParam, Types.LPARAM lParam)

Parameters

uMsg User32.WindowMessage
wParam Types.WPARAM
lParam Types.LPARAM

Returns

Types.LRESULT

EndPaint(ref PAINTSTRUCT)

public bool EndPaint(ref User32.PAINTSTRUCT lpPaint)

Parameters

lpPaint User32.PAINTSTRUCT

Returns

bool

EndPaint(HWND, ref PAINTSTRUCT)

public static Types.BOOL EndPaint(User32.Types.HWND hWnd, ref User32.PAINTSTRUCT lpPaint)

Parameters

hWnd User32.Types.HWND
lpPaint User32.PAINTSTRUCT

Returns

Types.BOOL

GetClientRect(out RECT)

public bool GetClientRect(out User32.RECT rect)

Parameters

rect User32.RECT

Returns

bool

GetClientRect(HWND, out RECT)

public static bool GetClientRect(User32.Types.HWND hWnd, out User32.RECT rc)

Parameters

hWnd User32.Types.HWND
rc User32.RECT

Returns

bool

GetDpiForWindow(HWND)

public static extern uint GetDpiForWindow(User32.Types.HWND hwnd)

Parameters

hwnd User32.Types.HWND

Returns

uint

GetWindowRect(out RECT)

public bool GetWindowRect(out User32.RECT rect)

Parameters

rect User32.RECT

Returns

bool

GetWindowRect(HWND, out RECT)

public static bool GetWindowRect(User32.Types.HWND hWnd, out User32.RECT lpRect)

Parameters

hWnd User32.Types.HWND
lpRect User32.RECT

Returns

bool

GetWindowText(out string, int)

public int GetWindowText(out string text, int maxLength)

Parameters

text string
maxLength int

Returns

int

GetWindowText(HWND, out string, int)

public static int GetWindowText(User32.Types.HWND hWnd, out string lpString, int maxLength)

Parameters

hWnd User32.Types.HWND
lpString string
maxLength int

Returns

int

Invalidate()

public void Invalidate()

InvalidateRect(HWND, nint, bool)

public static bool InvalidateRect(User32.Types.HWND hWnd, nint rectPtr, bool erase)

Parameters

hWnd User32.Types.HWND
rectPtr nint
erase bool

Returns

bool

InvalidateRect(HWND, ref RECT, bool)

public static bool InvalidateRect(User32.Types.HWND hWnd, ref User32.RECT rect, bool erase)

Parameters

hWnd User32.Types.HWND
rect User32.RECT
erase bool

Returns

bool

IsZoomed(HWND)

public static bool IsZoomed(User32.Types.HWND hWnd)

Parameters

hWnd User32.Types.HWND

Returns

bool

ReleaseCapture()

public static bool ReleaseCapture()

Returns

bool

ScreenToClient(ref POINT)

public bool ScreenToClient(ref User32.POINT point)

Parameters

point User32.POINT

Returns

bool

ScreenToClient(HWND, ref POINT)

public static Types.BOOL ScreenToClient(User32.Types.HWND hWnd, ref User32.POINT lpPoint)

Parameters

hWnd User32.Types.HWND
lpPoint User32.POINT

Returns

Types.BOOL

SetCapture(HWND)

public static extern User32.Types.HWND SetCapture(User32.Types.HWND hWnd)

Parameters

hWnd User32.Types.HWND

Returns

User32.Types.HWND

SetWindowPos(HWND, HWND, int, int, int, int, SetWindowPosFlags)

public static bool SetWindowPos(User32.Types.HWND hWnd, User32.Types.HWND hWndInsertAfter, int X, int Y, int cx, int cy, User32.Types.SetWindowPosFlags uFlags)

Parameters

hWnd User32.Types.HWND
hWndInsertAfter User32.Types.HWND
X int
Y int
cx int
cy int
uFlags User32.Types.SetWindowPosFlags

Returns

bool

SetWindowText(string)

public bool SetWindowText(string text)

Parameters

text string

Returns

bool

SetWindowText(HWND, string)

public static bool SetWindowText(User32.Types.HWND hWnd, string lpString)

Parameters

hWnd User32.Types.HWND
lpString string

Returns

bool

ShowWindow(int)

public void ShowWindow(int nCmdShow = 1)

Parameters

nCmdShow int

ShowWindow(HWND, int)

public static bool ShowWindow(User32.Types.HWND hWnd, int nCmdShow)

Parameters

hWnd User32.Types.HWND
nCmdShow int

Returns

bool

UpdateWindow()

public bool UpdateWindow()

Returns

bool

UpdateWindow(HWND)

public static bool UpdateWindow(User32.Types.HWND hWnd)

Parameters

hWnd User32.Types.HWND

Returns

bool

Operators

implicit operator HWND(nint)

public static implicit operator User32.Types.HWND(nint v)

Parameters

v nint

Returns

User32.Types.HWND

implicit operator nint(HWND)

public static implicit operator nint(User32.Types.HWND v)

Parameters

v User32.Types.HWND

Returns

nint