Platform SDK: MAPI |
The PR_CONTROL_FLAGS property contains a bitmask of flags governing the behavior of a control used in a dialog box built from a display table.
Header file: | MAPITAGS.H |
Must be a column in: | Display tables |
Identifier: | 0x3F00 |
Property type: | PT_LONG |
Property tag: | 0x3F000003 |
One or more of the following flags can be set for PR_CONTROL_FLAGS:
The PR_CONTROL_FLAGS property is stored in the ulCtlFlags member of a control's DTCTL structure. Most of the control flags apply to all of the controls that allow user input; a few apply only to the edit control. Controls that do not allow user input, such as a button or a label, set 0 for their control flags.
Many of the flag values are self-explanatory. For example, when DT_REQUIRED is set for a control, it must contain a value before the dialog box is allowed to be dismissed. Either the service provider can supply a value through its IMAPIProp implementation or the user can enter one. DT_EDITABLE indicates that the value for the control can be modified. DT_MULTILINE allows the value for an edit control to span multiple lines.
Some control flags are not so obvious in their meaning. When a control sets the DT_SET_IMMEDIATE flag, any changes to its value take affect as soon as the user moves to a new control. MAPI makes a single call to the property interface's IMAPIProp::SetProps method for the control's property. This is different from the default behavior, which is to postpone having changes to control values take effect until after the user selects the OK button or dismisses the dialog box. The DT_SET_IMMEDIATE flag is often used in combination with display table notifications.
The following table lists the types of controls and all of the flag values that can be set for each type.
Control | Valid values for PR_CONTROL_FLAGS |
---|---|
Button | Must be zero |
Check box | DT_EDITABLE, DT_SET_IMMEDIATE |
Combo box | DT_EDITABLE, DT_REQUIRED, DT_SET_IMMEDIATE |
Drop-down list box | DT_EDITABLE, DT_SET_IMMEDIATE |
Edit | DT_ACCEPT_DBCS, DT_MULTILINE, DT_EDITABLE, DT_PASSWORD_EDIT, DT_REQUIRED, DT_SET_IMMEDIATE |
Group box | Must be zero |
Label | Must be zero |
List box | Must be zero |
Multivalue drop-down list box | Must be zero |
Multivalue list box | Must be zero |
Tabbed page | Must be zero |
Radio button | Must be zero |