E D R , A S I H C RSS

Dubble_Buffering

Source Code



~cpp
 CDC memDC;
	CBitmap bitmap, *pOldBitmap;
	CBrush brush;
	CRect rect;
	GetClientRect(&rect);
	brush.CreateSolidBrush(RGB(255,255,255));
	memDC.CreateCompatibleDC(pDC);
	bitmap.CreateCompatibleBitmap(pDC, rect.Width(), rect.Height());
	pOldBitmap = memDC.SelectObject(&bitmap);
	memDC.FillRect(CRect(0,0, rect.right, rect.bottom), &brush);

               // to do : add draw code with memDC

	pDC->BitBlt(0, 0,  rect.Width(), rect.Height(), &memDC, 0, 0, SRCCOPY);

	memDC.SelectObject(pOldBitmap);

Thread

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:23:09
Processing time 0.0135 sec