# GenericMessagePopup

int GenericMessagePopup (char title[], char message[], char buttonLabel1[], char buttonLabel2[], char buttonLabel3[], char responseBuffer[], int maxResponseLength, int buttonAlignment, int activeControl, int enterButton, int escapeButton);

## Purpose

Displays a dialog box with a defined message and optionally accepts a response string.

You can use up to three buttons and specify their labels. GenericMessagePopup returns a value indicating which button the user pressed.

## Parameters

Input
Name | Type | Description
title | string | Title of the dialog box.
message | string | Message to display in the dialog box. To display a multi-line message, embed newline characters (\n) in the message string.
buttonLabel1 | string | Label on button 1.
buttonLabel2 | string | Label on button 2. To hide buttons 2 and 3, pass 0 to buttonLabel2.
buttonLabel3 | string | Label on button 3. To hide button 3, pass 0 to buttonLabel3.
maxResponseLength | integer | Maximum number of bytes the user is allowed to enter. The responseBuffer must be large enough to contain all of the user input plus one ASCII NUL byte.
buttonAlignment | integer | The location of the buttons. A nonzero value aligns the buttons along the right-hand side of the dialog box. A value of zero aligns the buttons along the bottom of the dialog box.
activeControl | integer | Selects one of the buttons or the input string as the active control. The active control is the control that accepts keystrokes. The following values apply to activeControl: VAL_GENERIC_POPUP_BTN1 VAL_GENERIC_POPUP_BTN2 VAL_GENERIC_POPUP_BTN3 VAL_GENERIC_POPUP_INPUT_STRING
enterButton | integer | Selects which button has <Enter> as its shortcut key. Pass VAL_GENERIC_POPUP_NO_CTRL if no button uses <Enter> as its shortcut key.
escapeButton | integer | Selects which button has <Esc> as its shortcut key. Pass VAL_GENERIC_POPUP_NO_CTRL if no button uses <Esc> as its shortcut key.
Output
Name | Type | Description
responseBuffer | string | Buffer in which to store the user response. The buffer must be large enough to hold maxResponseLength bytes plus one ASCII NUL byte. To hide the input string, pass 0.

## Return Value

Name | Type | Description
button | integer | Returns an indication of which button the user clicked.
1 | VAL_GENERIC_POPUP_BTN1
2 | VAL_GENERIC_POPUP_BTN2
3 | VAL_GENERIC_POPUP_BTN3
Negative values indicate that an error occurred.