You are here

Usage (e.g. in a dialog window)

  1. Add a edit control to the dialog resource to the (e.g. ID=IDC_HER).
  2. Add a member variable of the type CHertzEdit to the dialog class (here: m_herEdit).
  3. Add the function DDX_HertzEdit as handler to the method DoDataExchange() of the dialog class:

    void CMyDialog::DoDataExchange(CDataExchange* pDX)
    {
            CDialog::DoDataExchange(pDX);
            //{{AFX_DATA_MAP(CParameterPage1)
            DDX_HertzEdit(pDX, IDC_HER, m_herEdit);
            //}}AFX_DATA_MAP
    }

  4. Call the method SubClassDlgItem() inside the method OnInitDialog of the dialog class:
    BOOL CMyDialog::OnInitDialog()
    {
            CDialog::OnInitDialog();
            m_herEdit.SubclassDlgItem(IDC_HER, this);
            return(TRUE);
    }