Attached Testcase and C file from Petzold's cd.
Basically it opens a window with a horizontal scrollbar since the width of the window is smaller than its content.
If you manually resize the window, then scrollbar seems to disappear properly when the content fits it.
However if instead resizing you click the Maximize button, then the scrollbar is not invalidated and it is still shown. It is a glitch because as soon as you force a repaint (ie, placing a window on top of it), the scrollbar vanishes.
Probably Maximize button should force a non-client area repaint and it is missing?
I_Kill_Bugs requested a Jira ticket for this issue so, here it is. Hope you can find a fix for it.