SftButton/DLL 3.0 - Button Control
SftTree/DLL 8.0 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 4.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 8.0 - Tree Control
SftButton/DLL 3.0 - Button Control
SftTree/DLL 8.0 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 4.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 8.0 - Tree Control
SftTree/NET 2.0 - Tree Control
The masked edit control can automatically fill an empty control with a default value, defined using the lpszDefaultText field of the SFTMASK_CONTROL structure.
The default text is entered as if typed - each character is validated against the edit mask, so it must fit the mask.
The following special values are supported (case-insensitive):
| =Today | Today's date (and time) is entered into the date/time fields of the mask. |
| =Yesterday | Yesterday's date is entered. |
| =Tomorrow | Tomorrow's date is entered. |
| =Now | The current date and time is entered. |
The iDefaultStyle field defines when the default text is applied:
| SFTMASK_DEFAULT_IMMEDIATE | The moment the contents become empty, including while the user is editing - deleting all input instantly restores the default. This is the default setting. |
| SFTMASK_DEFAULT_DELAYED | Applied only when the empty control loses the input focus, so the user can clear the field and type something else without the default snapping back mid-edit. |
An application can apply the default text at any time using the SetDefaultValue function.
SFTMASK_CONTROL Ctl; Ctl.cbSize = sizeof(SFTMASK_CONTROL); SftMask_GetControlInfo(hwndCtl, &Ctl); Ctl.lpszMask = (LPTSTR) TEXT("$D"); Ctl.lpszDefaultText = (LPTSTR) TEXT("=Today"); Ctl.iDefaultStyle = SFTMASK_DEFAULT_IMMEDIATE; SftMask_SetControlInfo(hwndCtl, &Ctl);
See Also SetDefaultValue | SFTMASK_DEFAULT Constants | Edit Masks | SFTMASK_CONTROL
