?? advedit.cpp
字號:
// AdvEdit.cpp : implementation file
//
#include "stdafx.h"
#include "cal.h"
#include "AdvEdit.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAdvEdit
CAdvEdit::CAdvEdit()
{
}
CAdvEdit::~CAdvEdit()
{
}
BEGIN_MESSAGE_MAP(CAdvEdit, CEdit)
//{{AFX_MSG_MAP(CAdvEdit)
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAdvEdit message handlers
void CAdvEdit::OnPaint()
{
CPaintDC dc(this); // device context for painting
// TODO: Add your message handler code here
OnDraw();
// Do not call CEdit::OnPaint() for painting messages
}
void CAdvEdit::OnDraw()
{
CRect rect;
GetClientRect(&rect);
CDC *pDC=GetDC();
pDC->SetBkMode(TRANSPARENT);
CBrush *pBrush=new CBrush(RGB(255,255,255));
pDC->FillRect(&rect,pBrush);
pDC->SetTextColor(RGB(92,92,92));
pDC->DrawText(m_Caption,rect,DT_SINGLELINE|DT_VCENTER|DT_RIGHT);
}
void CAdvEdit::OnDisplay(LPCTSTR lpszStr)
{
m_Caption=lpszStr;
OnDraw();
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -