readme.wzd
来自「《vc++扩展编程实例》源码。运用Visual C++ 5.0或6.0的高级编程」· WZD 代码 · 共 40 行
WZD
40 行
/////////////////////////////////////////////////////////////////////
// Example files.
/////////////////////////////////////////////////////////////////////
WzdBtmap.cpp -- a bitmap class which will create a new stretched bitmap
WzdBtmap.h of its contents
/////////////////////////////////////////////////////////////////////
// Modify any class that owns a window.
/////////////////////////////////////////////////////////////////////
// 1) create a stretched bitmap using the bitmap class above
CRect rect;
GetClientRect(&rect);
CBitmap *pBitmap=m_bitmap.Stretch(rect.Width(),rect.Height(),
COLORONCOLOR);
// also HALFTONE -- slower but attempts to averge colors
// BLACKONWHITE -- monotone--scacrifices white for black pixels
// WHITEONBLACK -- monotone--sacrifices black for white pixels
// if you use HALFTONE, must also call the following next to realign the brush
::SetBrushOrgEx( pDC->m_hDC, 0,0, NULL);
// 2) draw the stretched bitmap to the window
CDC dcComp;
dcComp.CreateCompatibleDC(pDC);
dcComp.SelectObject(pBitmap);
pDC->BitBlt(0,0,rect.Width(),rect.Height(), &dcComp, 0,0,SRCCOPY);
// 3) destroy created, stretched bitmap
delete pBitmap;
/////////////////////////////////////////////////////////////////////
// From: Visual C++ MFC Programming by Example by John E. Swanke
// Copyright (C) 1999 jeswanke. All rights reserved.
/////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?