Either one or two pages may be shown in print preview when zoomed out.
This value is stored in the registry in native wordpad, and preserved
while opening and closing the print preview. Zooming in will only show one
page, but the pages shown value must be saved because it will return to the
preview pages shown value after unzooming completely. If two pages should
be shown when there is only one page of text, then a second blank page is
shown.
In print preview you can zoom in by left clicking on one of the pages. The
zoom cursor is displayed whenever the mouse is over the page to indicate to
the user that they can zoom in. When fully zoomed in it will zoom out when
this is done again. When clicking on the second page, it will zoom into
that page.
The preview is now drawn onto it's own window rather directly onto
the client area of the top level window. This is done to allow for
scrollbars, since the page won't usually fit in the window when zoomed in.
Refactoring was needed as a result of this, and in order to provide more
granularity for updates to avoid EM_FORMATRANGE messages being sent when
the page the same page is being displayed.
Previously the window size and position was obtained in such a way that
when the window is closed while minimized, it would be hidden when the
program is started again. Closing a maximized window would save the
size of the maximized window and use it as the normal/restored size when
the program is started again.