To fix this bug in the MFC List Control you need to specialize the control, over-ride the method wich responds to the scroll, and force it to redraw the list completely after it has done the scroll.
interface header
class cSmoothListControl : public CListCtrl
{
public:
DECLARE_MESSAGE_MAP()
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
};
implementation:
BEGIN_MESSAGE_MAP(cSmoothListControl, CListCtrl)
ON_WM_VSCROLL()
END_MESSAGE_MAP()
void cSmoothListControl::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
// call base class method to do scroll
CListCtrl::OnVScroll(nSBCode, nPos, pScrollBar);
// force redraw to cover any mess that may be created
Invalidate();
UpdateWindow();
}