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

📄 xpedit.cpp

📁 校园导游系统
💻 CPP
字号:
// XpEdit.cpp : implementation file
//

#include "stdafx.h"
//#include "多功能周历.h"
#include "XpEdit.h"

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

/////////////////////////////////////////////////////////////////////////////
// CXpEdit

CXpEdit::CXpEdit()
{
	m_clrText=RGB(0,0,0);
	m_clrBkgnd=RGB(255,255,255);
	m_brBkgnd.CreateSolidBrush(m_clrBkgnd);
}

CXpEdit::~CXpEdit()
{
}


BEGIN_MESSAGE_MAP(CXpEdit, CEdit)
	//{{AFX_MSG_MAP(CXpEdit)
	ON_WM_PAINT()
	ON_WM_CTLCOLOR_REFLECT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CXpEdit message handlers

void CXpEdit::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	
	// TODO: Add your message handler code here	
	CRect rect;
	GetWindowRect(rect);
	rect.left += 1;
	rect.right -= 1;
	rect.top += 1;
	rect.bottom -= 1;

	ScreenToClient(rect);
	dc.Draw3dRect(rect,RGB(250,140,70),RGB(250,140,70));
	Invalidate();
	Default();
	// Do not call CEdit::OnPaint() for painting messages
}

void CXpEdit::SetColor(COLORREF clrBk, COLORREF clrText)
{
	m_clrText=clrText;
	m_clrBkgnd=clrBk;
}

HBRUSH CXpEdit::CtlColor(CDC* pDC, UINT nCtlColor) 
{
	// TODO: Change any attributes of the DC here
	pDC->SetTextColor(m_clrText);
	pDC->SetBkColor(m_clrBkgnd);
	return m_brBkgnd;
}

⌨️ 快捷键说明

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