|What is the difference between the macros WS_VSCROLL and SBS_VERT?|
is window style while
is common control style.
window style mans that when you create a window such as top level window, with this flag you specify that the window has scrollbar, whose messages you then handle in window procedure.
common control style is a flag when you subclass or superclass common control (scrollbar) in this case, where the
tells that the scroll bar common control your are creating is vertical scroll bar.
|Flat scroll bars are supported by Comctl32.dll versions 4.71 through 5.82. Comctl32.dll versions 6.00 and later do not support flat scroll bars.|
I didn't know that honestly, probably because I never used flat scrollbar, but if it's not supported for Comctl version 6 then that means IMO creating custom scrollbar or subclassin common control scrollbar is more modern way to do it. at the expense of being harder to do implement it I guess.
|what do the ScrollWindow() and ScrollWindowEx() functions do?|
These are used to scroll window client area while the user drags the scrollbar.
Petzhold has good example on how to do it.
|the WM_PAINT case is still having to repaint the entire client area.|
WM_PAINT is better passed to default procedure unless you want to paint the scrollbard yourself ex. to apply custom uxtheme/visual styles.
It's not that hard to do, you only need to know which API's to use for drawing control frames (with or without styles).
visual styles are documented on MSDN as bad as some non public API's, I spent weeks to "unlock" how to use it.