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

📄 newclientwnd.cpp

📁 Visual C++高级编程及其项目应用开发(含源代码)
💻 CPP
字号:
// NewClientWnd.cpp : implementation file
//

#include "stdafx.h"
#include "clientMain.h"
#include "NewClientWnd.h"

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

/////////////////////////////////////////////////////////////////////////////
// CNewClientWnd

CNewClientWnd::CNewClientWnd()
{
}

CNewClientWnd::~CNewClientWnd()
{
}

BEGIN_MESSAGE_MAP(CNewClientWnd, CWnd)
	//{{AFX_MSG_MAP(CNewClientWnd)
	ON_WM_ERASEBKGND()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CNewClientWnd message handlers

BOOL CNewClientWnd::OnEraseBkgnd(CDC* pDC) 
{
	// TODO: Add your message handler code here and/or call default
	// 设置画刷为希望的背景色
	CBrush backBrush(RGB(100, 200, 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;
	//return CWnd::OnEraseBkgnd(pDC);
}

⌨️ 快捷键说明

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