Try updating the window after the move :

Code: c++
void CShabbirDlg::OnBnClickedButton2()
{
      // TODO: Add your control notification handler code here
      if (pageNum <= 10) {
            pageNum++;
            CRect RRect, LRect;

            //Get the coordinates of the right and left picture control
            picPreview2.GetWindowRect(&RRect);
            picPreview.GetWindowRect(&LRect);

            //Move the left picture control to the right
            for (long int i = LRect.left; i > RRect.left; i -= 20) {
                  picPreview.MoveWindow(i , LRect.top, LRect.Width(), LRect.Height());
            }
            this->Invalidate();
      }
}