Skip to main content
www.olaf-groeger.de

Main navigation

  • Home
  • NMR
  • Programming
    • Streams
    • Subclassing of edit controls
  • Software
    • Calimah Scheduler
    • ServicesCtl

Breadcrumb

  1. Home
  2. Programming
  3. Subclassing of Edit Controls
  4. Members and Constructors/destructors

Members and constructors/destructors

By olaf , 3 July 2025

The class CHertzEdit is derived from CEdit. It contains three member variables. The variable bNegativAllowed is a status flag that signals that the control allows negative values or not. It can only be set during the construction. The variable m_dValue saves the value of the control as number while the variable m_strValuecontains the value as formatted string including the unit.

CHertzEdit::CHertzEdit()
{
        m_dValue=0.0;
        m_bNegativAllowed=TRUE;
        m_strValue= _T("");
}

CHertzEdit::CHertzEdit(BOOL bNegativAllowed)
{
        m_bNegativAllowed=bNegativAllowed;
        m_dValue=0.0;
        m_strValue= _T("");
}

CHertzEdit::CHertzEdit(const CHertzEdit& he)
{
        m_bNegativAllowed=he.m_bNegativAllowed;
        m_dValue=he.m_dValue;
        m_strValue=he.m_strValue;
}

CHertzEdit::~CHertzEdit()
{
}

BEGIN_MESSAGE_MAP(CHertzEdit, CEdit)
        //{{AFX_MSG_MAP(CHertzEdit)
        ON_WM_CHAR()
        ON_WM_KILLFOCUS()
        //}}AFX_MSG_MAP
END_MESSAGE_MAP()

Book traversal links for 15

  • CHertzEdit.h
  • Up
  • Conversions between the data types double and CString

Language switcher

  • English
  • German
Powered by Drupal