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

📄 readme.wzd

📁 VC++MFC编程实例书籍的配套光盘.共有80余个例子
💻 WZD
字号:
/////////////////////////////////////////////////////////////////////
// Example files...
/////////////////////////////////////////////////////////////////////

WzdBtmap.cpp -- a bitmap class which reads a file and creates a bitmap
WzdBtmap.h

/////////////////////////////////////////////////////////////////////
// Modify any class with a window.
/////////////////////////////////////////////////////////////////////

// 1) embed the bitmap in the class
	CWzdBitmap m_bitmap;

// 2) load bitmap, typically when processing the window's WM_CREATE message
	m_bitmap.LoadBitmapEx(IDB_WZD,TRUE);

// 3) draw bitmap
	// get bitmap colors
	CPalette *pOldPal = pDC->SelectPalette(m_bitmap.GetPalette(),FALSE);
	pDC->RealizePalette();

	// get device context to select bitmap into
	CDC dcComp;
	dcComp.CreateCompatibleDC(pDC);
	dcComp.SelectObject(&m_bitmap);

	// draw bitmap
	pDC->BitBlt(0,0,m_bitmap.m_Width,m_bitmap.m_Height, &dcComp, 0,0,SRCCOPY);

	// reselect old palette
	pDC->SelectPalette(pOldPal,FALSE);

/////////////////////////////////////////////////////////////////////
// From: Visual C++ MFC Programming by Example by John E. Swanke
// Copyright (C) 1998 jeswanke. All rights reserved.
/////////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

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