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
Applies a SFTMASK_CONTROL structure to the masked edit control, setting its attributes.
C
BOOL SftMask_SetControlInfo(HWND hwndCtl, LPSFTMASK_CONTROL lpCtl);C++
BOOL CSftMask::SetControlInfo(LPSFTMASK_CONTROL lpCtl);hwndCtl
The window handle of the masked edit control.
lpCtl
The address of a SFTMASK_CONTROL structure with the control's new attributes. The cbSize member must be set to sizeof(SFTMASK_CONTROL) before the call.
The return value is TRUE if the attributes were applied successfully. If a field is invalid, FALSE is returned and the read-only errorValue member of the structure identifies the offending field (see SFTMASK_ERR Constants); errorPos reports the position within the mask, if applicable.
All strings referenced by the structure are copied by the control; the application's buffers can be discarded after the call.
The edit mask can only be changed by itself - a SetControlInfo call that changes lpszMask must not change any other fields (see SFTMASK_ERR_MASKONLY). Changing the mask discards the control's contents.
Ctl.captioniVerticalAlignment = SFTMASK_VERTALIGNBASELINE;
Ctl.captionnSizePercent = 40;
Ctl.lpszLabel = (LPTSTR) TEXT("|"); // "|" displays the locale currency symbol
Ctl.lpszMask = (LPTSTR) TEXT("$C-,8.2");
Ctl.nCalcLines = 6;
Ctl.nFracDigits = 2;
Ctl.iClipMode = SFTMASK_CLIPEXCLUDE;
Ctl.nDarkMode = SFTMASK_DARKMODE_AUTO;
SftMask_SetControlInfo(hwndEdit, &Ctl);
}
/**********************************************************************/
/* Dialog Proc */
/**********************************************************************/
INT_PTR CALLBACK MainDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
Ctl.captioniVerticalAlignment = SFTMASK_VERTALIGNBASELINE;
Ctl.captionnSizePercent = 40;
Ctl.lpszLabel = (LPTSTR) _T("|"); // "|" displays the locale currency symbol
Ctl.lpszMask = (LPTSTR) _T("$C-,8.2");
Ctl.nCalcLines = 6;
Ctl.nFracDigits = 2;
Ctl.iClipMode = SFTMASK_CLIPEXCLUDE;
Ctl.nDarkMode = SFTMASK_DARKMODE_AUTO;
m_Amount.SetControlInfo(&Ctl);
// Dark mode
SftDarkMode_ApplyToDialog(m_hWnd);
return TRUE;
}
See Also GetControlInfo | SFTMASK_CONTROL | SFTMASK_ERR Constants
