| DialogAddRequest | Function (Macro)

dialogs.h

HANDLE DialogAddRequest (HANDLE Handle, short x, short y, const char *prompt, unsigned short offset, short MaxLen, short width);

Adds a request box into a dialog box.

DialogAddRequest adds a request box (i.e. an input line box) to the dialog structure associated with handle Handle at the position (x, y), where coordinates are relative to the top-left corner of the dialog box. A prompt prompt will appear in front of the request box. All request boxes in one dialog box will be aligned in according to a request box which has the longest prompt, except when the prompt string finishes with '`' character (code 96). In such case, the request box will start immidiately after the prompt string ('`' is a special character, which will not be displayed). If the prompt is not finished with '`', it will be eventually padded with '.' characters up to the length of the longest prompt, except when the prompt finishes with ':'. In such case, the prompt will be padded with space character (':' will also be displayed).
Maximal number of characters which may be entered is determined by parameter MaxLen, and width determines the actual width of the request box. It will be such that the widest string made of width characters may fit into the box. So, the real width of box in pixels will be width * 6, because the widest character 'M' is 6 pixels wide. If you try to enter a string with more than width characters, the content of the request box will scroll. If width is wider than the actual avaliable width of the dialog box, the request box will be truncated at the edge of the dialog box.
Parameter offset determines what will be the initial content of the request box, and where the entered characters will be stored. See DialogDo for info on how and where the entered characters are actually stored.
DialogAddRequest returns H_NULL in a case of error, otherwise it returns Handle. This routine (as well as all other 'DialogAdd...' routines) may cause heap compression.

Uses: DialogAdd