Scrolling can be a tricky subject for a novice GUI programmer to tackle. The Windows 3.1 API ensures that the suffering is as acute as possible by requiring the application to program the scrollbar behaviour, to check the scrollbar positions on repainting, and to reposition the scroll bars on window resizing. XView has the decency to provide a canvas event with coordinates that reflect what the scrollbars are doing. In wxWindows, the XView approach is taken, so that all the programmer has to do is to create scrollbars with a given scroll length and increment, and the repaint procedure automatically reflects scrollbar positions. Obviously this simple approach can be inefficient if the canvas doesn't know what is actually in view, so the application can get the current view in order to limit the amount of repainting required.
It is possible to tell a wxWindows canvas to be retained (though this only has an effect in XView and Motif). In this case no repaint events will happen when scrolling since the system remembers what was drawn and simply moves a bitmap around.
Under Windows 3.1, wxWindows scrolls the bits of the canvas around when the user generates a scroll event, so the canvas does not need to be cleared and only the damaged areas need be repainted---so all the application need do is redraw the whole image, and scrolling will appear to be relatively smooth. This is the case in the hello.exe demo.
However, there are times when we can't allow the system to scroll the bits of the image, for example when a scroll increment will result in an unpredictable actual movement of the image. This is true for wxHelp, since scrolling is in terms of lines, and lines vary in height. If we left it up to wxWindows to scroll without clearing the screen, the text would then overlay some of the previous screen since the old and new images will probably not exactly match.
In the wxHelp application (see wxHelp) the horizontal direction is scrolled in terms of pixels, not character widths, and so wxWindows can be left to scroll the image smoothly, without having to clear before repainting. This kind of control is avilable by using wxCanvas::EnableScrolling.
Scrolling panels have yet to be implemented in wxWindows.