CreateWindowEx function user32
Win32Result<HWND>
CreateWindowEx(
- WINDOW_EX_STYLE dwExStyle,
- PCWSTR? lpClassName,
- PCWSTR? lpWindowName,
- WINDOW_STYLE dwStyle,
- int x,
- int y,
- int nWidth,
- int nHeight,
- HWND? hWndParent,
- HMENU? hMenu,
- HINSTANCE? hInstance,
- Pointer<
NativeType> ? lpParam,
Creates an overlapped, pop-up, or child window with an extended window style; otherwise, this function is identical to the CreateWindow function.
To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-createwindowexw.
Implementation
Win32Result<HWND> CreateWindowEx(
WINDOW_EX_STYLE dwExStyle,
PCWSTR? lpClassName,
PCWSTR? lpWindowName,
WINDOW_STYLE dwStyle,
int x,
int y,
int nWidth,
int nHeight,
HWND? hWndParent,
HMENU? hMenu,
HINSTANCE? hInstance,
Pointer? lpParam,
) {
resolveGetLastError();
final result_ = _CreateWindowEx(
dwExStyle,
lpClassName ?? nullptr,
lpWindowName ?? nullptr,
dwStyle,
x,
y,
nWidth,
nHeight,
hWndParent ?? nullptr,
hMenu ?? nullptr,
hInstance ?? nullptr,
lpParam ?? nullptr,
);
return .new(value: .new(result_), error: GetLastError());
}