it is usually like this
1. create a source dc which contains the original thing to draw(bitmap,shape or whatever)
2. depends upon your scroll bar position, use BitBlt function to copy the required amount of pixels from source DC to your client dc(whose size is GetClientRect)..
hopes this will help you somewhat.
jkchan
http://cgmath.blogspot.com