Thanks for the replies. I finaly figured out what was wrong, and as you suggested the breakpoint-thing was due to a WM_PAINT being send to the grid between the statements. The problem was that SetScrollPos32 uses SetScrollInfo, where you can set the scroll bar position but not the thumb track position. The WM_VSCROLL handler in the grid would read the thumb track position (and not the scroll bar position) in response to SB_THUMBPOSITION and this would in turn set the first item to be displayed to a wrong value. The WM_PAINT message send by the break/continue event would invoke OnDraw, where the first item to be displayed would be set from the scroll bar position (and not the thumb track position), hence this worked. I just removed the SendMessage(WM_VSCROLL, SB_THUMBPOSITION, 0) and replaced it with a call to Invalidate() - and then everything worked. Thanks for yourhelp Cheers Steen. "To claim that computer games influence children is ridiculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"