WORDPAD sample is the windows application located in the Accessories folder. There is not some many Windows applications, shipped with its source code. Enjoy.
The real benefit of this sample is to demonstrate the power of embedding the Rich-text control (alias RTF Edit Control) in your application.
The *hidden* feature of the WORDPAD application is that the print-preview feature is written from scratch, hand by hand to support the preview of OLE2 objects.
Example: a rich document (RTF) can embedded graphics, or emebedded applications. To proprely display this in the preview-print window and to print the document on a printer device, the source code to achieve this is a little bit complicated. You have to deeply enter into the OLE2 world and in the Object Linking and Embedding application model, with is described in a book, named Inside OLE2 from Kraig B, under MSPress.
WORDPAD source code is accessible for free, since 1994 and before may be. I learned OLE2 with it. I learned the way to make a full preview print from scratch with WORDPAD.
Thanks guys !