The function calls a selection dialog or just a message. You can create up to three buttons, inclusive.

Appeal format:

int res = tsalert(int messagecode,string stitle,string smessagebig, string ssmall,string button1,string button2,string button3);


Here:

messagecode - numerical code of the window view:

-1 - error message

-2 - warning

-3 - informational message.

stitle - title of the window, smessagebig - message in large letters, ssmall - message below in small text, button1 - button3 - texts for the corresponding buttons.

Res returns the result of the user's selection.

If the button1 is pressed - the result is 1, button2 - 2, button3 - 3. If the user refuses the choice, 0 is returned.

Example.

Get the user to decide how many items to display (10, 1, or all). Explain what you can try. if the user selects "All" - report to the message box. If he refuses - also report in the message box.


int res = tsalert(-3, "Set value", "How many items to display?", "For test unloading, it is convenient to display not all markers first", "10", "1", "Все");

if (res == 0)

{

    cout << "User refused";

    return;

}