65,186
社区成员




CLientDC XXDC(this)
Graphics memGraphics ;
Bitmap bmpMBoard(XXXWidth , XXXHeigh) ;
Graphics memGraphics (&bmpMBoard);
Graphics scrGraphics( screenDC->GetSafeHdc());
///绘图
///
// 输出
memGraphics .XXXXXXX
///
scrGraphics.DrawImage(&bmpMBoard , 0 , 0)
HDC memDC;
HDC global_hdc;
global_hdc=GetDC(hWnd);
memDC=CreateCompatibleDC(NULL);
HBITMAP bmp=CreateCompatibleBitmap(global_hdc,width,height);
HBITMAP OldBmp=(HBITMAP)SelectObject(memDC,bmp);
VOID Paint(HDC hdc) {
Graphics graphics(hdc);
}
HWND hWnd;
HDC hdc;
PAINTSTRUCT ps;
case WM_ERASEBKGND:
return 1;
case WM_PAINT:
hdc=BeginPaint(hWnd, &ps);
BitBlt(memDC,0,0,width,height,hdc,0,0,SRCCOPY);
Paint(memDC);
BitBlt(hdc,0,0,width,height,memDC,0,0,SRCCOPY);
EndPaint(hWnd, &ps);
return 0;
SelectObject(global_hdc,OldBmp);
DeleteObject(bmp);
DeleteDC(memDC);
ReleaseDC(hWnd,global_hdc);