AdjustWindowRectExForDpi function user32
Win32Result<bool>
AdjustWindowRectExForDpi(
- Pointer<
RECT> lpRect, - WINDOW_STYLE dwStyle,
- bool bMenu,
- WINDOW_EX_STYLE dwExStyle,
- int dpi,
Calculates the required size of the window rectangle, based on the desired size of the client rectangle and the provided DPI.
To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-adjustwindowrectexfordpi.
Implementation
Win32Result<bool> AdjustWindowRectExForDpi(
Pointer<RECT> lpRect,
WINDOW_STYLE dwStyle,
bool bMenu,
WINDOW_EX_STYLE dwExStyle,
int dpi,
) {
resolveGetLastError();
final result_ = _AdjustWindowRectExForDpi(
lpRect,
dwStyle,
bMenu ? TRUE : FALSE,
dwExStyle,
dpi,
);
return .new(value: result_ != FALSE, error: GetLastError());
}