HeaderPane
Main
Hide

SftMask/DLL 7.0 - Masked Edit Control

Share Link
Print

GetControlInfo

Retrieves the current SFTMASK_CONTROL structure describing the masked edit control's attributes.

C

BOOL SftMask_GetControlInfo(HWND hwndCtl, LPSFTMASK_CONTROL lpCtl);

C++

BOOL CSftMask::GetControlInfo(LPSFTMASK_CONTROL lpCtl) const;

Parameters

hwndCtl

The window handle of the masked edit control.

lpCtl

The address of a SFTMASK_CONTROL structure receiving the control's attributes. The cbSize member must be set to sizeof(SFTMASK_CONTROL) before the call.

Returns

The return value is TRUE if the attributes were retrieved successfully.

Comments

String pointers returned in the structure point to control-internal storage and must not be modified or freed. They remain valid until the next call into the control.

The recommended pattern for changing control attributes is GetControlInfo, modify the desired fields, SetControlInfo.

Examples

C

/**********************************************************************/

static void InitAmount(HWND hwndDlg)
{
    HWND hwndEdit = GetDlgItem(hwndDlg, IDC_AMOUNT);
    SFTMASK_CONTROL Ctl;

    Ctl.cbSize = sizeof(SFTMASK_CONTROL);
    SftMask_GetControlInfo(hwndEdit, &Ctl);
    Ctl.fAutoSize = TRUE;
    Ctl.iAlignment = ES_RIGHT;
    Ctl.iBorderStyle = SFTMASK_BORDER_THIN;
    Ctl.iEntrySelect = SFTMASK_ENTRYSELECTHOMEEND;
    Ctl.lpszCaption = (LPTSTR) TEXT("&Amount:");
    Ctl.captionfTransparent = TRUE;
    Ctl.captioniPosition = SFTMASK_POSITIONLEFT;

C++

    CDialog::OnInitDialog();

    SetIcon(m_hIcon, TRUE);   // Set big icon
    SetIcon(m_hIcon, FALSE);  // Set small icon

    // Currency amount with dropdown calculator
    SFTMASK_CONTROL Ctl;
    Ctl.cbSize = sizeof(SFTMASK_CONTROL);
    m_Amount.GetControlInfo(&Ctl);
    Ctl.fAutoSize = TRUE;
    Ctl.iAlignment = ES_RIGHT;
    Ctl.iBorderStyle = SFTMASK_BORDER_THIN;
    Ctl.iEntrySelect = SFTMASK_ENTRYSELECTHOMEEND;
    Ctl.lpszCaption = (LPTSTR) _T("&Amount:");
    Ctl.captionfTransparent = TRUE;
    Ctl.captioniPosition = SFTMASK_POSITIONLEFT;

See Also SetControlInfo | SFTMASK_CONTROL


Last Updated 08/30/2026 - (email)
© 2026 Softel vdm, Inc.