www.pudn.com > ssproj03.zip > MyEdit.cpp


// MyEdit.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "ssproj03.h" 
#include "MyEdit.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CMyEdit 
 
CMyEdit::CMyEdit() 
{ 
	m_IsOk=false; 
} 
 
CMyEdit::~CMyEdit() 
{ 
} 
 
 
BEGIN_MESSAGE_MAP(CMyEdit, CEdit) 
	//{{AFX_MSG_MAP(CMyEdit) 
	ON_WM_KEYUP() 
	ON_WM_KEYDOWN() 
	ON_WM_CHAR() 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CMyEdit message handlers 
 
void CMyEdit::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)  
{ 
	// TODO: Add your message handler code here and/or call default 
	if(nChar==13) 
		m_IsOk=true; 
	else 
		CEdit::OnKeyUp(nChar, nRepCnt, nFlags); 
} 
 
void CMyEdit::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)  
{ 
	// TODO: Add your message handler code here and/or call default 
	 
	CEdit::OnKeyDown(nChar, nRepCnt, nFlags); 
} 
 
void CMyEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)  
{ 
	// TODO: Add your message handler code here and/or call default 
	 
	CEdit::OnChar(nChar, nRepCnt, nFlags); 
}