MessageBox function user32
Win32Result<MESSAGEBOX_RESULT>
MessageBox(
- HWND? hWnd,
- PCWSTR? lpText,
- PCWSTR? lpCaption,
- MESSAGEBOX_STYLE uType,
Displays a modal dialog box that contains a system icon, a set of buttons, and a brief application-specific message, such as status or error information.
The message box returns an integer value that indicates which button the user clicked.
To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-messageboxw.
Implementation
Win32Result<MESSAGEBOX_RESULT> MessageBox(
HWND? hWnd,
PCWSTR? lpText,
PCWSTR? lpCaption,
MESSAGEBOX_STYLE uType,
) {
final result_ = MessageBoxW_Wrapper(
hWnd ?? nullptr,
lpText ?? nullptr,
lpCaption ?? nullptr,
uType,
);
return Win32Result(
value: MESSAGEBOX_RESULT(result_.value.i32),
error: result_.error,
);
}