www.pudn.com > Jianasyhttpclient.rar > MyCombo.cpp


// MyCombo.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "asyhttpclient.h" 
#include "MyCombo.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CMyCombo 
 
CMyCombo::CMyCombo() 
{ 
} 
 
CMyCombo::~CMyCombo() 
{ 
} 
 
 
BEGIN_MESSAGE_MAP(CMyCombo, CComboBox) 
	//{{AFX_MSG_MAP(CMyCombo) 
	ON_WM_CHAR() 
	ON_CONTROL_REFLECT(CBN_EDITCHANGE, OnEditchange) 
	ON_CONTROL_REFLECT(CBN_EDITUPDATE, OnEditupdate) 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CMyCombo message handlers 
 
void CMyCombo::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)  
{ 
	// TODO: Add your message handler code here and/or call default 
	AfxMessageBox("ok,onchar");  
	CComboBox::OnChar(nChar, nRepCnt, nFlags); 
} 
 
void CMyCombo::OnEditchange()  
{ 
	// TODO: Add your control notification handler code here 
	AfxMessageBox("ok,oneditchange!");  
} 
 
void CMyCombo::OnEditupdate()  
{ 
	// TODO: Add your control notification handler code here 
	 
	UINT nChar; 
    int nlen; 
	CString str; 
	GetWindowText(str); 
	nlen=str.GetLength();  
	//if nChar=13  
	// AfxMessageBox("ok,you hit enter in oneditupdate!");  
     
}