Click here to Skip to main content
15,885,546 members
Articles / Desktop Programming / MFC

CEdit Enhancement

Rate me:
Please Sign up or sign in to vote.
4.81/5 (10 votes)
31 Jan 2001 231K   2.9K   41  
A CEdit enhancement for efficient data capturing.
#if !defined(AFX_TESTDLG_H__7178FBC4_BA36_11D4_86A6_0050DA426F23__INCLUDED_)
#define AFX_TESTDLG_H__7178FBC4_BA36_11D4_86A6_0050DA426F23__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// TestDlg.h : Header-Datei
//
#include "autoedit.h"

// define the Validation Interfaces

class CDayValidate : public CEditValidate 
{
    virtual CString validate(CString& str);
};

class CMonthValidate : public CEditValidate 
{
    virtual CString validate(CString& str);
};

class CYearValidate : public CEditValidate 
{
    virtual CString validate(CString& str);
};

class CBinValidate : public CEditValidate 
{
    virtual CString validate(CString& str);
};


/////////////////////////////////////////////////////////////////////////////
// Dialogfeld CTestDlg 

class CTestDlg : public CDialog
{
// Konstruktion
public:
	CTestDlg(CWnd* pParent = NULL);   // Standardkonstruktor

// Dialogfelddaten
	//{{AFX_DATA(CTestDlg)
	enum { IDD = IDD_DIALOG1 };
	CAutoEdit	m_Edit4;
	CAutoEdit	m_Edit3;
	CAutoEdit	m_Edit2;
	CAutoEdit	m_Edit1;
	//}}AFX_DATA


// �berschreibungen
	// Vom Klassen-Assistenten generierte virtuelle Funktions�berschreibungen
	//{{AFX_VIRTUAL(CTestDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV-Unterst�tzung
	//}}AFX_VIRTUAL

// Implementierung
protected:

	// Generierte Nachrichtenzuordnungsfunktionen
	//{{AFX_MSG(CTestDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnDestroy();
	virtual void OnOK();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()


    CDayValidate* m_dayValidate;
    CMonthValidate* m_monthValidate;
    CYearValidate* m_yearValidate;
    CBinValidate* m_binValidate;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ f�gt unmittelbar vor der vorhergehenden Zeile zus�tzliche Deklarationen ein.

#endif // AFX_TESTDLG_H__7178FBC4_BA36_11D4_86A6_0050DA426F23__INCLUDED_

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Chief Technology Officer
Switzerland Switzerland
Professional IT developer since 1983. First projects with Cobol, then Pascal, Modula2, C and since Visual C++ 1.0 also with C++ and today C#. Works since 1986 as Consultant, between 1990 and 2008 for Infobrain in Switzerland, from 2008 until 2013 for enValue (also Switzerland) and currently working for Comfone (Bern, Switzerland).

Married, two grown-up daughters, Hobbies : Paragliding, Orienteering, Mountainbiking, Photography

Comments and Discussions