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
Various fields of the SFTMASK_CONTROL structure are available to define the visual appearance of the masked edit control:
| iAlignment | The horizontal alignment of the contents (ES_LEFT, ES_CENTER, ES_RIGHT). While the control has the input focus, left and right aligned text display is possible. While the control does not have the input focus, left, centered or right aligned text is possible. The lpszFormattedText field can be used to override the default contents while the control does not have the input focus. |
| fAutoSize | Controls the height of the control. By setting fAutoSize to TRUE, the control's height is automatically adjusted so text is never clipped vertically. The height of the control is increased or decreased as necessary based on the size of the font used (defined using the WM_SETFONT message and the captionFont field). |
| iBorderStyle | Defines the border style of the control (see SFTMASK_BORDER Constants). |
| lpszCaption and caption* fields | Describe the attributes of the control's caption area (see Built-In Caption). |
| fDDButtonVScrollWidth | Defines whether the drop down button uses the width of a vertical scrollbar. |
| iEditStyle | Defines whether up/down buttons, a calendar drop down button or an ellipse button is displayed (see SFTMASK_EDIT Constants). |
| Font | The font used to display the contents of the control is defined using the WM_SETFONT message. Modifiable fields can optionally be underlined using the fPromptUnderline field. The height of the control may automatically be adjusted when the font changes, based on the fAutoSize field. |
| lpszFormattedText | This optional field can be used to display text when the masked edit control does not have the input focus, overriding the (default) formatted contents of the control. |
| fHideSelection | Defines the display of the currently selected text when the control does not have the input focus. |
| fHotTrack | Defines whether up/down, drop down and ellipse buttons are hot-tracked. |
| lpszLabel, iLabelPosition | Define a label displayed inside the edit area (see Label). |
| chPromptChar | Modifiable fields can display the prompt character in places where data has not yet been entered. The default is a space character. The fPromptUnderline field can be used to underline input fields. The fPromptUnderline field should be used instead of defining chPromptChar as an underscore ("_") character. |
| fPromptUnderline, fPromptUnderlineNoFocus | These fields can be used to underline areas where data has not been entered, with and without the input focus. |
| chPswdChar | If data entered should not be displayed (e.g. in password fields), the chPswdChar field can be used to define the character that should be displayed instead of actual data. The chPswdChar field only takes effect if the "<p" subtoken is used in a mask or if no mask has been defined (see Edit Masks). |
| iUseThemes | Defines whether Windows themes are used (see Using Themes). |
| nDarkMode | Defines whether the control participates in Windows dark mode (see Dark Mode). |
| nHighContrastMode | Defines whether the control honors the Windows High Contrast setting (see High Contrast). |
| Colors | |
|---|---|
| colorBg | Defines the background color of the control. Text that is selected (highlighted) uses the background color defined using colorSelectBg. |
| colorBgInvalid | Defines the background color of the control, which is used when the control's contents are invalid. |
| colorBgFocus | Defines the control's background color while it has the input focus. |
| colorFg | Defines the foreground color used to display text and fields modifiable by the user, provided the control is enabled. Literals defined using the edit mask use the color defined using colorMaskFg. Text that is selected (highlighted) uses the foreground color defined using colorSelectFg. If the control is disabled, the color defined using colorFgGrayed is used instead. |
| colorFgInvalid | Defines the foreground color used to display text and fields modifiable by the user. This color is only used when the control's contents are invalid. |
| colorFgFocus | Defines the control's default text color while it has the input focus. |
| colorFgGrayed | Defines the foreground color used to display text and fields modifiable by the user, provided the control is disabled. Literals defined using the edit mask use the color defined using colorMaskFgGrayed. If the control is enabled, the color defined using colorFg is used instead. |
| colorMaskFg | Defines the foreground color used to display text not modifiable by the user (literals), provided the control is enabled. Text that is selected (highlighted) uses the foreground color defined using colorSelectFg. If the control is disabled, the color defined using colorMaskFgGrayed is used instead. |
| colorMaskFgGrayed | Defines the foreground color used to display text not modifiable by the user (literals), provided the control is disabled. If the control is enabled, the color defined using colorMaskFg is used instead. |
| colorSelectBg | Defines the background color of text that is selected (highlighted). |
| colorSelectBgFocus | Defines the control's background color for selected text while it has the input focus. |
| colorSelectFg | Defines the foreground color used to display text that is selected (highlighted). |
| colorSelectFgFocus | Defines the control's selected text color while it has the input focus. |
| captionColorBg, captionColorFg, captionColorFgGrayed | Define the caption area colors (see Built-In Caption). |
| calcColor* fields | Define the popup calculator colors (see Popup Calculator). |
| calendarColor* fields | Define the popup calendar colors (see Popup Calendar). |
All color fields accept an RGB value or SFTMASK_NOCOLOR to use the applicable default color. System color values (COLOR_* | 0x80000000L) can also be used, which resolve to the current system colors, including the user's high contrast palette when high contrast is active.
See Also Built-In Caption | Label | Using Themes | Dark Mode | High Contrast | SFTMASK_CONTROL
