DTBLCOMBOBOX 

The DTBLCOMBOBOX structure describes a combo box control to be used in a dialog box built from a display table.

Quick Info

Header file:

MAPIDEFS.H

Related macro:

SizedDtblComboBox54A7KK

 

typedef struct _DTBLCOMBOBOX

     ULONG ulbLpszCharsAllowed;

     ULONG ulFlags;

     ULONG ulNumCharsAllowed;

     ULONG ulPRPropertyName;

     ULONG ulPRTableName;

} DTBLCOMBOBOX, FAR *LPDTBLCOMBOBOX;

 

Members

ulbLpszCharsAllowed

An offset from the beginning of the DTBLCOMBOBOX structure to a character string filter that describes restrictions, if any, to the characters that can be entered into the combo box s edit control.

The filter is not interpreted as a regular expression and the same filter is applied to every character entered.The format of the filter is as follows:

*   Any character is allowed (for example,  * ).

[  ] Defines a set of characters (for example,  [0123456789] ).

-   Indicates a range of characters (for example,  [a-z] ).

~  Indicates that these characters are not allowed. (for example,  [~0-9] ).

\   Used to quote any of the above symbols (for example,  [\-\\\[\]]  means -, \, [, and ] characters are allowed).

ulFlags

Bitmask of flags used to designate the format of the character string filter. The following flag can be set:

MAPI_UNICODE

The filter is in Unicode format. If the MAPI_UNICODE flag is not set, the filter is in ANSI format.

ulNumCharsAllowed

Maximum number of characters that can be entered in the combo box s edit box.

ulPRPropertyName

Property tag for a property of type PT_TSTRING.

ulPRTableName

Property tag for a property of type PT_OBJECT on which an IMAPITable interface can be opened using an OpenProperty call. The table must have one column with a property that is the same type as the property identified by the ulPRPropName member. The rows of the table are used to populate the list box.

 

Remarks

A DTBLCOMBOBOX structure describes a combo box   a control that consists of a list box and a selection field. The list box presents the information from which a user can select, and the selection field displays the current selection. The selection field is an edit control that can also be used to enter text not already in the list.

The following dialog box includes an example of a combo box.

{bmc bm9.BMP}

The two property tag members work together to coordinate the list box display with the edit control. When MAPI first displays the combo box, it calls the OpenProperty method of the IMAPIProp implementation that is associated with the display table to retrieve the table represented by the ulPRTableName member. This table has one column   a column that contains values for the property represented by the ulPRPropertyName member. Therefore, this column must be of the same type as the ulPRPropertyName property and both columns must be character strings.

The values for the column are displayed in the list box portion of the combo box. Therefore, PR_NULL is not a valid property tag for ulPRPropertyName. When a user either selects one of the rows or enters new data into the edit box, the ulPRPropertyName property is set to the selected or entered value.

To display an initial value for the edit control, MAPI calls IMAPIProp::GetPropsK06IXU to retrieve the property values for the display table. If one of the retrieved properties matches the property represented by the ulPRPropertyName member, its value becomes the initial value.

For an overview of display tables, see Display Tables12983_W. For information about implementing a display table, see Implementing a Display Table3Q3A1K.

See Also

DTCTL, PR_CONTROL_TYPE