www.pudn.com > Shutdown.rar > Y_Cls_Mouth_.cpp


// Y_Cls_Mouth_.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "Y_Cls_Mouth_.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// Y_Cls_Mouth_ 
 
Y_Cls_Mouth_::Y_Cls_Mouth_() 
{ 
} 
 
Y_Cls_Mouth_::~Y_Cls_Mouth_() 
{ 
} 
 
 
BEGIN_MESSAGE_MAP(Y_Cls_Mouth_, CMonthCalCtrl) 
	//{{AFX_MSG_MAP(Y_Cls_Mouth_) 
	ON_WM_KILLFOCUS() 
	ON_NOTIFY_REFLECT(MCN_SELCHANGE, OnSelchange) 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// Y_Cls_Mouth_ message handlers 
 
void Y_Cls_Mouth_::OnKillFocus(CWnd* pNewWnd)  
{ 
	CMonthCalCtrl::OnKillFocus(pNewWnd); 
	 
	// TODO: Add your message handler code here 
	::SendMessage(this->GetParent()->m_hWnd,MSG_KILLMOUTH,0,0); 
} 
 
 
void Y_Cls_Mouth_::OnSelchange(NMHDR* pNMHDR, LRESULT* pResult)  
{ 
	// TODO: Add your control notification handler code here 
	char ch_time[80]; 
	SYSTEMTIME   m_time; 
	GetCurSel(&m_time);  
	 
	 
	sprintf(ch_time,"%u-%u-%u",m_time.wYear,m_time.wMonth,m_time.wDay); 
	::SendMessage(this->GetParent()->m_hWnd,MSG_SELECTDATE,WPARAM(ch_time),0); 
		 
	*pResult = 0; 
}