DialogAddTitleEx Function (Macro)

dialogs.h

HANDLE DialogAddTitleEx (HANDLE Handle, short flags, const char *title, short left_button, short right_button);

Adds a title/header bar and up to two buttons into a dialog box. Extended version.

DialogAddTitleEx adds a title/header bar with the text title and up to two buttons to the dialog structure associated with the handle Handle.

The parameters left_button and right_button determine the type of the left and right buttons which eventually will appear at the bottom of the dialog box (by giving BT_NONE as the parameter, you can skip adding a button). The set of possible buttons is very limited. See DlgMessage for information about possible types. If you wish to have buttons without having a title bar, then you must use an owner draw item (see DialogAddTextEx and the explanation on owner draw items given with DialogNew for more information).

The parameter flags can be zero or DF_SCREEN_SAVE if you wish the dialog code to save the area underneath the dialog box when it is started, DB_MEMFULL is returned if it cannot. Note that if you use this flag, the title item must be the first one to be created. These flags are defined in the DialogFlags enumeration.

The order of item creation is very important, as it automatically gives each item an identification number (the first created item will get an identification number of 0, the second one will get 1, and so on). Every function that creates an item (i.e. every function beginning with 'DialogAdd...') will increase this identification number.

DialogAddTitleEx returns H_NULL in case of an error, may return DB_MEMFULL if you used DF_SCREEN_SAVE, else returns Handle. This routine (as well as all other 'DialogAdd...' routines) may cause heap compression.

DialogAddTitleEx is in fact a macro created for your convenience. It calls DialogAdd with D_HEADER as the ItemType parameter. Note that DialogAddTitleEx is the same macro as DialogAddTitle except for the parameter flags which is always set to zero in DialogAddTitle. In both functions, zero is passed to the x and y parameters. (These parameters are ignored when you use D_HEADER as the ItemType.)


Uses: DialogAdd