The DTCTL structure describes a control to be used in a dialog box built from a display table.
Header file: | MAPIUTIL.H |
typedef struct
{
ULONG ulCtlType;
ULONG ulCtlFlags;
LPBYTE lpbNotif;
ULONG cbNotif;
LPTSTR lpszFilter;
ULONG ulItemID;
union
{
LPVOID lpv;
LPDTBLLABEL lplabel;
LPDTBLEDIT lpedit;
LPDTBLLBX lplbx;
LPDTBLCOMBOBOX lpcombobox;
LPDTBLDDLBX lpddlbx;
LPDTBLCHECKBOX lpcheckbox;
LPDTBLGROUPBOX lpgroupbox;
LPDTBLBUTTON lpbutton;
LPDTBLRADIOBUTTON lpradiobutton;
LPDTBLMVLISTBOX lpmvlbx;
LPDTBLMVDDLBX lpmvddlbx;
LPDTBLPAGE lppage;
} ctl;
} DTCTL, FAR *LPDTCTL;
The format of the filter string 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).
The DTCTL structure describes one control of any type. Most of its members are used to set properties on the control.
The ctl member is a union of structures that relate to a particular type of control. If the DTCTL structure is describing an edit control, for example, the ctl member will point to an DTBLEDIT structure. This structure corresponds to the control's PR_CONTROL_STRUCTURE property. The union has as its first member a variable of type LPVOID to permit compile time initialization of the DTCTL structure.
Although the BuildDisplayTable function uses the DTCTL structure for building the display table from control resources, the DTCTL structure never appears in the display table itself. This structure simply supplies information to BuildDisplayTable.
In the ulCtlFlags member, four flags — DT_ACCEPT_DBCS, DT_EDITABLE, DT_MULTILINE_and DT_PASSWORD_EDIT — affect edit controls only. Two others — DT_REQUIRED and DT_SET_IMMEDIATE — affect any editable control.
The controls available for a dialog box are label, edit box, ink-aware edit box, list box, drop-down list box, combo box, check box, group box, button, radio button, and tabbed page.
For an overview of display tables, see Display Tables. For information about implementing a display table, see Implementing a Display Table.
Display Table Structures, BuildDisplayTable, DTBLBUTTON, DTBLCHECKBOX, DTBLCOMBOBOX, DTBLDDLBX, DTBLEDIT, DTBLGROUPBOX, DTBLLABEL, DTBLLBX, DTBLMVDDLBOX, DTBLMVLISTBOX, DTBLPAGE, DTBLRADIOBUTTON