?? yclientwnd.cpp
字號:
// YClientWnd.cpp : implementation file
//
#include "stdafx.h"
#include "VCStyle.h"
#include "YClientWnd.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// YClientWnd
YClientWnd::YClientWnd()
{
}
YClientWnd::~YClientWnd()
{
}
BEGIN_MESSAGE_MAP(YClientWnd, CWnd)
//{{AFX_MSG_MAP(YClientWnd)
ON_WM_ERASEBKGND()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// YClientWnd message handlers
BOOL YClientWnd::OnEraseBkgnd(CDC* pDC)
{
/*
// 設置畫刷為希望的背景色
CBrush backBrush;
backBrush.Create(RGB(255, 128, 128));
// 保存舊畫刷
CBrush* pOldBrush = pDC->SelectObject(&backBrush);
CRect rect;
pDC->GetClipBox(&rect);
// 擦除需要的區域
// 用創建的畫刷繪制背景區域
pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(),
PATCOPY);
pDC->SelectObject(pOldBrush);
return TRUE;
*/
// Create a hatched bit pattern.
WORD HatchBits[8] = { 0x11, 0x22, 0x44, 0x88, 0x11,
0x22, 0x44, 0x88 };
// Use the bit pattern to create a bitmap.
CBitmap bm;
//bm.CreateBitmap(8,8,1,1, HatchBits);
bm.LoadBitmap(IDB_BITMAPBK);
// Create a pattern brush from the bitmap.
CBrush backBrush;
backBrush.CreatePatternBrush(&bm);
// 保存舊畫刷
CBrush* pOldBrush = pDC->SelectObject(&backBrush);
CRect rect;
pDC->GetClipBox(&rect);
// 擦除需要的區域
// 用創建的畫刷繪制背景區域
pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(),
PATCOPY);
pDC->SelectObject(pOldBrush);
return TRUE;
// return CWnd::OnEraseBkgnd(pDC);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -