Hello,
You may shift the window contents to one pixel left with the code mentioned below.
Now, you can do what you want to plot at the right end of the window. If you put the whole code in a WM_TIMER message handler, this will give the effect of movement.Code:CRect Rect; GetClientRect(Rect); CDC MemDC; CClientDC DC(this); if (MemDC.CreateCompatibleDC(&DC)) { CBitmap BM; if (BM.CreateCompatibleBitmap(&DC, Rect.Width(), Rect.Height())) { CBitmap* pBM = MemDC.SelectObject(&BM); MemDC.BitBlt(0, 0, Rect.Width(), Rect.Height(), &DC, 0, 0, SRCCOPY); DC.BitBlt(-1, 0, Rect.Width(), Rect.Height(), &MemDC, 0, 0, SRCCOPY); MemDC.SelectObject(pBM); BM.DeleteObject(); } MemDC.DeleteDC(); }
Regards,
Pravin.




Reply With Quote