⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basedatetimectrl.cpp

📁 一个有关人事系统的所有代码和有关文件包括里面小量数据库。
💻 CPP
字号:
// BaseDateTimeCtrl.cpp : implementation file
//

#include "stdafx.h"
#include "Rsglxt.h"
#include "BaseDateTimeCtrl.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CBaseDateTimeCtrl

CBaseDateTimeCtrl::CBaseDateTimeCtrl()
{
}

CBaseDateTimeCtrl::~CBaseDateTimeCtrl()
{
}


BEGIN_MESSAGE_MAP(CBaseDateTimeCtrl, CDateTimeCtrl)
	//{{AFX_MSG_MAP(CBaseDateTimeCtrl)
	ON_WM_CTLCOLOR_REFLECT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CBaseDateTimeCtrl message handlers

BOOL CBaseDateTimeCtrl::PreTranslateMessage(MSG* pMsg) 
{
	// TODO: Add your specialized code here and/or call the base class
	if(pMsg->message==WM_KEYDOWN && pMsg->wParam==13)
		pMsg->wParam=9;		
	return CDateTimeCtrl::PreTranslateMessage(pMsg);
}

HBRUSH CBaseDateTimeCtrl::CtlColor(CDC* pDC, UINT nCtlColor) 
{
	// TODO: Change any attributes of the DC here
	CDC* dc = GetDC(); //获取画布对象
	CRect rect;
	GetClientRect(rect); //获取客户区域
	rect.InflateRect(1,1,1,1);//将客户区域增大一个像素
	CBrush brush (m_Colour);//创建画刷
	dc->FrameRect(rect,&brush);//绘制边框
	// TODO: Return a non-NULL brush if the parent's handler should not be called
	return NULL;
}

void CBaseDateTimeCtrl::SetColour(COLORREF Colour)
{

	m_Colour = Colour;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -