Skip to content
nyfrk edited this page Aug 22, 2020 · 1 revision

ISettlers4Api::ShowMessageBox method

This method will show an in-game rendered message box with an ok button and a specified message.

Syntax

S4CUSTOMUI ISettlers4Api::ShowMessageBox(
	LPCWSTR title, 
	LPCWSTR message, 
	INT x, 
	INT y, 
	INT w, 
	INT h
);

Parameters

title

A zero terminated wide character string that represents the title of the message box.

message

A zero terminated wide character string that represents the message body of the message box.

x

The x position in the client area of the top left corner of the message box.

y

The y position in the client area of the top left corner of the message box.

w

The width of the message box in pixels.

h

The height of the message box in pixels.

Return value

The return value is a handle to the custom UI element. You should not pass it to ISettlers4Api::DestroyCustomUiElement, ISettlers4Api::HideCustomUiElement or ISettlers4Api::ShowCustomUiElement as the handle automatically invalidates when the user closes the message box. You therefore do not have to free the resources yourself.

The return value will be NULL if the message box could not be created.

Remarks

This method does create and show the message box in one step.

Requirements

Minimum API Level 1
Target Edition Any
Header S4ModApi.h
Library S4ModApi.lib
DLL S4ModApi.dll

See also

ISettlers4Api

ISettlers4Api::DestroyCustomUiElement

ISettlers4Api::HideCustomUiElement

ISettlers4Api::ShowCustomUiElement.

Clone this wiki locally