Hide

SftMask/OCX 7.0 - ActiveX Masked Edit Control

Display
Print

Sample2 Sample (C++)

This sample illustrates autocomplete.

The source code is located at C:\Program Files (x86)\Softelvdm\SftMask OCX 7.0\Samples\VC++\Sample2\Sample2Dlg.cpp or C:\Program Files\Softelvdm\SftMask OCX 7.0\Samples\VC++\Sample2\Sample2Dlg.cpp (on 32-bit Windows versions).

BOOL CSample2Dlg::OnInitDialog()
{
    CDialog::OnInitDialog();

    // Set the icon for this dialog.  The framework does this automatically
    //  when the application's main window is not a dialog
    SetIcon(m_hIcon, TRUE);            // Set big icon
    SetIcon(m_hIcon, FALSE);        // Set small icon

    m_vMask1 = GetDlgItem(IDC_SFTMASK1)->GetControlUnknown();
    ASSERT(m_vMask1 != NULL);
    m_vMask2 = GetDlgItem(IDC_SFTMASK2)->GetControlUnknown();
    ASSERT(m_vMask2 != NULL);
    m_vMask3 = GetDlgItem(IDC_SFTMASK3)->GetControlUnknown();
    ASSERT(m_vMask3 != NULL);
    m_vMaskFiles1 = GetDlgItem(IDC_SFTMASKFILES1)->GetControlUnknown();
    ASSERT(m_vMaskFiles1 != NULL);
    m_vMaskFiles2 = GetDlgItem(IDC_SFTMASKFILES2)->GetControlUnknown();
    ASSERT(m_vMaskFiles2 != NULL);

    return TRUE;  // return TRUE  unless you set the focus to a control
}

void CSample2Dlg::OnEllipseClickedSftMaskFiles1()
{
    CFileDialog dlg(TRUE);
    if (dlg.DoModal() == IDOK)
        m_vMaskFiles1->Text = _bstr_t(dlg.GetPathName()) ;
}

BEGIN_EVENTSINK_MAP(CSample2Dlg, CDialog)
    //{{AFX_EVENTSINK_MAP(CSample2Dlg)
    ON_EVENT(CSample2Dlg, IDC_SFTMASKFILES1, 39 /* EllipseClicked */, OnEllipseClickedSftMaskFiles1, VTS_NONE)
    //}}AFX_EVENTSINK_MAP
END_EVENTSINK_MAP()

Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.