www.pudn.com > ODBCApi.rar > ItemEdit.cpp


// ItemEdit.cpp : 实现文件 
// 
 
#include "stdafx.h" 
#include "ItemEdit.h" 
#include ".\itemedit.h" 
 
 
 
// CItemEdit 
 
IMPLEMENT_DYNAMIC(CItemEdit, CEdit) 
CItemEdit::CItemEdit() 
{ 
} 
 
CItemEdit::~CItemEdit() 
{ 
} 
 
 
BEGIN_MESSAGE_MAP(CItemEdit, CEdit) 
	ON_CONTROL_REFLECT(EN_CHANGE, OnEnChange) 
	ON_WM_CREATE() 
END_MESSAGE_MAP() 
 
 
 
// CItemEdit 消息处理程序 
 
 
 
 
void CItemEdit::OnEnChange() 
{ 
	CWnd* pWnd = GetParent(); 
	if(pWnd!=NULL) 
	{ 
		::PostMessage(pWnd->m_hWnd, EN_EDIT, 0, 0); 
	} 
} 
 
int CItemEdit::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{ 
	if (CEdit::OnCreate(lpCreateStruct) == -1) 
		return -1; 
	CFont tpFont; 
	tpFont.CreateStockObject(DEFAULT_GUI_FONT); 
	SetFont(&tpFont); 
	tpFont.DeleteObject(); 
	return 0; 
}