Sorry I forgot the setup of the scroll bar :-O Its done like this. SCROLLINFO si ; si.cbSize = sizeof(SCROLLINFO) ; si.fMask = SIF_PAGE | SIF_RANGE ; si.nPage = myRect.Width() - 110; // The 110 is because I type measurement related info in a small box there. si.nMax = pDoc->m_datasize + myRect.Width() - 110; si.nMin = 0 ; I hope someone can help. Thanks.