?? bkchgedit.cpp
字號:
// BkChgEdit.cpp : implementation file
//
#include "stdafx.h"
#include "SeriesPort.h"
#include "BkChgEdit.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// BkChgEdit
BkChgEdit::BkChgEdit()
{
//m_BkColor=0x00000000;
}
BkChgEdit::~BkChgEdit()
{
}
BEGIN_MESSAGE_MAP(BkChgEdit, CEdit)
//{{AFX_MSG_MAP(BkChgEdit)
// ON_WM_CTLCOLOR_REFLECT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// BkChgEdit message handlers
//DEL void BkChgEdit::SetBkColor(COLORREF color)
//DEL {
//DEL m_BkColor=color;
//DEL
//DEL }
//DEL HBRUSH BkChgEdit::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
//DEL {
//DEL HBRUSH hbr = CEdit::OnCtlColor(pDC, pWnd, nCtlColor);
//DEL
//DEL // TODO: Change any attributes of the DC here
//DEL // CDC* dc=GetDC();
//DEL // dc->SetBkColor(m_BkColor);
//DEL
//DEL // TODO: Return a different brush if the default is not desired
//DEL return hbr;
//DEL }
//DEL HBRUSH BkChgEdit::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
//DEL {
//DEL HBRUSH hbr = CEdit::OnCtlColor(pDC, pWnd, nCtlColor);
//DEL
//DEL // TODO: Change any attributes of the DC here
//DEL
//DEL CDC* dc=GetDC();
//DEL CRect rect;
//DEL GetClientRect(rect);
//DEL rect.InflateRect(1,1,1,1);
//DEL CPen pen(PS_SOLID,1,m_BkColor);
//DEL
//DEL dc->SelectObject(&pen);
//DEL CBrush brush(m_BkColor);
//DEL dc->FrameRect(rect,&brush);
//DEL
//DEL // TODO: Return a different brush if the default is not desired
//DEL // return hbr;
//DEL return NULL;
//DEL }
//DEL void BkChgEdit::SetBkColor(COLORREF color)
//DEL {
//DEL m_BkColor=color;
//DEL
//DEL }
//DEL HBRUSH BkChgEdit::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
//DEL {
//DEL HBRUSH hbr = CEdit::OnCtlColor(pDC, pWnd, nCtlColor);
//DEL
//DEL // TODO: Change any attributes of the DC here
//DEL
//DEL // TODO: Return a different brush if the default is not desired
//DEL return hbr;
//DEL }
//DEL HBRUSH BkChgEdit::CtlColor(CDC* pDC, UINT nCtlColor)
//DEL {
//DEL // TODO: Change any attributes of the DC here
//DEL CDC* dc = GetDC(); //獲取畫布對象
//DEL CRect rect;
//DEL GetClientRect(rect); //獲取客戶區域
//DEL rect.InflateRect(1,1,1,1);//將客戶區域增大一個像素
//DEL
//DEL CPen pen(PS_SOLID,1,m_BkColor); //創建畫筆
//DEL dc->SelectObject(&pen);
//DEL
//DEL CBrush brush (m_BkColor);//創建畫刷
//DEL
//DEL dc->FrameRect(rect,&brush);//繪制邊框
//DEL // dc->FillRect(&rect,&brush);//繪制邊框
//DEL pDC->SetTextColor(RGB(255,0,0)); // blue
//DEL
//DEL
//DEL // TODO: Return a non-NULL brush if the parent's handler should not be called
//DEL return NULL;
//DEL }
//DEL void BkChgEdit::SetBkColor(COLORREF color)
//DEL {
//DEL m_BkColor=color;
//DEL HBRUSH BkChgEdit::CtlColor(CDC* pDC, UINT nCtlColor);
//DEL
//DEL }
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -