VB Code:
If X + ScrollWidth > ABBAckWidth Then 'We ned to glue at the beginnig again
'Calculate the remaining width
OX = X - SW
'Blit the first part
BitBlt Me.hdc, X, 0, ScrollWidth, ABBackHeight, DCABBAck, 0, 0, vbSrcCopy
'Now draw from the beginning again
BitBlt Me.hdc, OX, 0, ScrollWidth, ABBackHeight, DCABBAck, 0, 0, vbSrcCopy
ElseIf X + ScrollWidth < ABBAckWidth Then
OX = X + ScrollWidth
'Blit the first part
BitBlt Me.hdc, X, 0, ScrollWidth, ABBackHeight, DCABBAck, 0, 0, vbSrcCopy
'Now draw from the beginning again
BitBlt Me.hdc, OX, 0, ScrollWidth, ABBackHeight, DCABBAck, 0, 0, vbSrcCopy
Else
BitBlt Me.hdc, 0, 0, ScrollWidth, ABBackHeight, DCABBAck, 0, 0, vbSrcCopy
End If
That's (I think) working code. I would try it myself but I've just gotten up and must go do some errands :)