Hide

SftMask/OCX 7.0 - ActiveX Masked Edit Control

Display
Print

IP1 Sample (C++)

This sample illustrates IP address entry.

This is not an executable sample, so a complete project is not provided. These statements are intended to show basic concepts and the syntax used.

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

    m_pMask1 = m_Mask1.GetControlUnknown();
    _ASSERT(m_pMask1 != NULL);

    m_pMask1->Caption->SizePercent = 33;
    m_pMask1->Caption->Text = _T("&IP:");
    m_pMask1->Mask = _T("$I^03(0,255)\\.$I^03(0,255)\\.$I^03(0,255)\\.$I^03(0,255)");
    m_pMask1->Text = _T("127.0.0.1");
    m_pMask1->EditStyle = editSftMaskUpDown;
    m_pMask1->AutoAdvance = VARIANT_TRUE;
    m_pMask1->AutoSize = VARIANT_TRUE;
    m_pMask1->TabAdvance = VARIANT_TRUE;
    m_pMask1->TabAdvanceLast = VARIANT_TRUE;
    m_pMask1->EntrySelect = entrySftMaskSelectHome;
    m_pMask1->EntrySelectMouse = VARIANT_TRUE;

    return TRUE;
}

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