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. CHertzEdit.h

CHertzEdit.h

By olaf , 3 July 2025

First of all the header file:
class CHertzEdit : public CEdit
{
// Konstruktion

public:
        CHertzEdit();
        CHertzEdit(BOOL);
        CHertzEdit(const CHertzEdit&);

// Attributes
public:

// Operators
public:
        CHertzEdit& operator =(double);
// Überschreibungen
        // Vom Klassen-Assistenten generierte virtuelle Funktionsüberschreibungen
        //{{AFX_VIRTUAL(CHertzEdit)
        //}}AFX_VIRTUAL

// Implementation
public:
        BOOL SetValue(HWND);
        BOOL GetValue(HWND);
        double GetValue();
        void SetValue(double);

        virtual ~CHertzEdit();

protected:
        BOOL GetValueFromWindow(HWND);
        void SetValueToWindow(HWND);

        //{{AFX_MSG(CHertzEdit)
        afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
        afx_msg void OnKillFocus(CWnd* pNewWnd);
        //}}AFX_MSG

        DECLARE_MESSAGE_MAP()
private:
        double m_dValue;
        BOOL m_bNegativAllowed;
        CString m_strValue;

        BOOL GetValueFromWindow();
        void SetValueToWindow();

        std::string DoubleToString(double);
        double CStringToDouble(CString&);

        void StripEndingZero(std::ostringstream&);
};

void AFXAPI DDX_HertzEdit(CDataExchange*, int, CHertzEdit&);

Book traversal links for 15

  • Subclassing of edit controls
  • Up
  • Members and constructors/destructors

Language switcher

  • English
  • German
Powered by Drupal