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)
            DDX_HertzEdit(pDX, IDC_HER, m_herEdit);

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