HDC hdc;//设备DC
HDC buffhdc;//缓冲DC
RECT g_rect;
HBITMAP g_bkbitmap;
GetClientRect(hWnd,&g_rect);
hdc = GetDC(hWnd);//设备DC
buffhdc = CreateCompatibleDC(hdc);//缓冲DC
g_bkbitmap = CreateCompatibleBitmap(hdc,g_rect.right,g_rect.bottom);
SelectObject(buffhdc,g_bkbitmap);
DrawBackdrop(buffhdc);
Drawing(buffhdc);
BitBlt(hdc,0,0,g_rect.right,g_rect.bottom,buffhdc,0,0,SRCCOPY);
DeleteDC(buffhdc);
DeleteObject(g_bkbitmap);
ReleaseDC(hWnd, hdc);GDI+,使用一个缓冲(我叫它单缓冲,不知道对不对)
使用缓冲DC和设备DC绘制背景
最新推荐文章于 2018-05-24 09:44:33 发布
本文介绍了在Windows应用程序中使用缓冲DirectDraw (DD) 和设备DirectDraw (DD) 进行背景绘制的方法,包括获取窗口客户端区域、创建设备上下文、缓冲上下文、创建位图以及使用BitBlt进行位图复制。
2196

被折叠的 条评论
为什么被折叠?



