我想让一个区域动起来,
如何解决窗口刷新时区域的闪烁。
void CJhkljklView::OnDraw(CDC* pDC)
{
CJhkljklDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
int i;
int x[20],y[20];
CPen hPen;
POINT w[5];
// Temporary Bitmap.Used to fill hdcTemp.
// 用于填充临时DC
HBITMAP hBitmapTemp;
// Create a temporary DC for drawing bitmaps on it.
hdcTemp = CreateCompatibleDC(NULL);
// Create a Bitmap that will be selected to hdcTemp.
hBitmapTemp = CreateCompatibleBitmap(hdc,WIDTH,HEIGHT);
//填充临时DC
SelectObject(hdcTemp,hBitmapTemp);