64,649
社区成员
发帖
与我相关
我的任务
分享
HBITMAP hPlayBitmap = CreateCompatibleBitmap(hdc,50,50);
SelectObject(hMemDC,hPlayBitmap);
Graphics graph(hMemDC);
Image image(_T("Ply.png"),TRUE);
graph.DrawImage(&image,0,0,rect.right - rect.left,rect.bottom - rect.top);
BitBlt(hdc,0,0,50,50,hMemDC,0,0,SRCCOPY);
Image img(L"E:\\xiaoxin.png");
int nWidth = img.GetWidth();
int nHeight = img.GetHeight();
Bitmap* pBitmap = ::new Bitmap(nWidth, nHeight);
Graphics* pGraBitmap = Graphics::FromImage(pBitmap);
// 此处用pGraBitmap绘制图形。
// 比如调用pGraBitmap.DrawImage(img);
Graphics gra(m_hWnd);
gra.DrawImage(pBitmap, 10, 10);
::delete pBitmap;
Graphics graphics(hdc);
Image img(szFileName);
graphics.DrawImage(&img, 0, 0, rect.right - rect.left, rect.bottom - rect.top);