Platform SDK: MAPI |
The DTBLLBX structure describes a list box to be used in a dialog box that is built from a display table.
Header file: | MAPIDEFS.H |
typedef struct _DTBLLBX { ULONG ulFlags; ULONG ulPRSetProperty; ULONG ulPRTableName; } DTBLLBX, FAR *LPDTBLLBX
A DTBLLBX structure describes a list box — a control that is used to show multiple items and allow a user to select one or more of the items.
The ulPRSetProperty member and ulPRTableName member work together; when one value is chosen from the table, it is written back to ulPRSetProperty when the dialog box is dismissed.
The flags value indicates whether or not a horizontal or vertical scroll bar should be displayed with the list box. The default is to have types of scroll bars appear if necessary. Service providers can set MAPI_NO_HBAR to suppress a horizontal scroll bar and MAPI_NO_VBAR to suppress a vertical scroll bar.
The two property tag members work together to display values in the list box and set corresponding properties when an item in the list box is selected. When MAPI first displays the list box, it calls the IMAPIProp implementation's OpenProperty method to retrieve the table identified in the ulPRTableName member. The number of columns in the table depends on the value of the ulPRSetProperty member. If ulPRSetProperty is set to PR_NULL, the list box is a multiple selection list box based on an object that contains recipients, such as an address book container, a recipient table for a message, or a distribution list contents table.
A table for a multiple selection list box must include the following columns:
PR_DISPLAY_TYPE and a maximum of five other multivalued string properties can also be displayed with the three required columns.
If the ulPRSetProperty member is not set to PR_NULL, the list box is a single selection list box. The initial value of ulPRSetProperty determines the initially selected row. When a user selects one of the rows, the ulPRSetProperty member is set to the selected value and this value is written back to the property interface implementation with a call to IMAPIProp::SetProps.
For an overview of display tables, see Display Tables. For information about implementing a display table, see Implementing a Display Table.