Requirements:
Windows NT/2000/XP: Included in Windows 2000 and later.
Windows 95/98/Me: Included in Windows 98 and later.
Header: Declared in Wingdi.h; include Windows.h.
Library: Included as a resource in Msimg32.dll.
示例
:
void CTestDlg::SaveBitmap(CDC* pDC,CRect rect,CString filename)
{
CDC* memDC=new CDC;
memDC->CreateCompatibleDC(pDC);
CBitmap* bmp=new CBitmap;
bmp->CreateCompatibleBitmap(pDC,rect.Width(),rect.Height());
CBitmap* oldbitmap=me