Display Table Implementation
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A display table is used to show a property sheet, a special dialog box that is composed of one or more tabbed property pages dedicated to displaying and possibly editing one or more properties. Associated with every display table is an IAttach : IMAPIProp interface implementation. The IMAPIProp implementation maintains the property data that is presented in the property sheet.
The rows in a display table represent the controls in the property sheet. Most controls can be associated with properties maintained with the IMAPIProp implementation. When a user changes the value of a modifiable control, the corresponding property is updated.
The columns in a display table represent properties of the control, such as its position in the property sheet, its type, associated structure, and identifier. For a complete list of required display table columns, see Display Tables.
MAPI displays a property sheet to the user of a client application by reading property values from the IMAPIProp implementation associated with the display table or from the display table directly. As the user works with the property sheet, changing values in the controls, MAPI calls IMAPIProp::SetProps to save a changed control if the control's DT_SET_IMMEDIATE flag is set. For controls without the DT_SET_IMMEDIATE flag set, changes to properties are saved when the user dismisses the dialog box by clicking the OK or Apply Now button. When either of these buttons or the Cancel button is clicked, MAPI removes the property sheet from view.
MAPI gains access to your display table either by calling the IMAPIProp::OpenProperty method in the IMAPIProp implementation and requesting the PR_DETAILS_TABLE (PidTagDetailsTable) property or by inheriting it in a call that you have made to MAPI, such as IMAPISupport::DoConfigPropsheet.
The first access technique is used when address book providers are asked to show details about messaging users or distribution lists. The following processing occurs:
A client calls the IAddrBook::Details method.
MAPI calls the address book provider's IABLogon::OpenEntry method to access the messaging user that represents the selected entry.
MAPI calls the messaging user's IMAPIProp::OpenProperty method to retrieve the PR_DETAILS_TABLE property, the display table for the details dialog box.
MAPI displays the dialog box, handling the user's interaction with the information, and removes it when the user has finished.
A combination of the two access techniques is used when transport providers are asked to show a message options property sheet. The transport provider makes the property interface available to MAPI through a callback function. MAPI then calls the property interface to open the PR_DETAILS_TABLE property.
Before a message options property sheet can be shown, the transport provider must do the following:
Make the message options properties available by returning an OPTIONDATA structure that has information about supported options when MAPI calls its IXPLogon::RegisterOptions method.
Implement a function that conforms to the OPTIONCALLBACK prototype. The OPTIONCALLBACK function handles the data stored in the OPTIONDATA structure.
When it is time to show the message options property sheet, the following processing occurs:
The client calls IMAPISession::MessageOptions.
MAPI calls the transport provider's OPTIONCALLBACK function, which returns an IMAPIProp interface implementation. The OpenProperty method of this implementation supports the PR_DETAILS_TABLE property.
When the OPTIONCALLBACK function returns, MAPI calls OpenProperty to open PR_DETAILS_TABLE and retrieve the display table that describes the message options dialog box.
MAPI displays the dialog box, handling the user's interaction with the information, and removes it when the user is finished.