I am in the process of implementing scrolling in a custom edit control that I have been working on. What I was wondering was, is it essential to use ScrollWindowEx/ScrollWindow/ScrollDC to implement scrolling? I see that ScrollWindowEx just scrolls the paint area. All that is fine, but since my edit control implements double buffering, I’d have to update my BitBlt as well. That is a trivial thing, but I was wondering if it is essential. If I use only SetScrollInfo, that would also have the same effect. The only advantage that I see here is that when a user scrolls up or down, there would already be some text over there(because ScrollWindowEx shifts the target client area) and I wouldn’t have to bother aobut repainting. Is there any other advantage, or reason why ScrollWindowEx is used? I am new to scrolling in win32, and this is actually the first time I’ve had to do all the processing on my own instead of the api doing it for me, so I really don’t know how to go about this.
P.S.
Just to be clear, I’m not using MFC. Only Win32 api.
Programming Language : unmanaged C++
You can implement scrolling any way you want.
ScrollWindowetc will scroll the relevant part of the client area and invalidate the part that then needs repainting.In general this is an efficient and simple way to handle scrolling, so obviously it’s popular. But if you can show that in your case you can achieve the same result more efficiently, go for it.