Platform SDK: MAPI

DTBLLBX

The DTBLLBX structure describes a list box to be used in a dialog box that is built from a display table.

Quick Info

Header file: MAPIDEFS.H

typedef struct _DTBLLBX 
{ 
     ULONG ulFlags; 
     ULONG ulPRSetProperty; 
     ULONG ulPRTableName; 
} DTBLLBX, FAR *LPDTBLLBX 
 

Members

ulFlags
Bitmask of flags used to eliminate a horizontal or vertical scroll bar from the list box. The following flags can be set:
MAPI_NO_HBAR
No horizontal scroll bar should be shown with the list box.
MAPI_NO_VBAR
No vertical scroll bar should be shown with the list box.
ulPRSetProperty
Property tag for a property of any type. This property is one of the columns in the table identified by the ulPRTableTable member.
ulPRTableName
Property tag for a table property of type PT_OBJECT that can be opened using an OpenProperty call. The number of columns that the table should have depends on whether or not the list box is a single or multiple selection list box. If the ulPRSetProperty member is set to PR_NULL, the list box allows multiple selection.

Remarks

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_NAME

PR_ENTRYID

PR_INSTANCE_KEY

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.

See Also

Display Table Structures, DTCTL