SECTNDocument Class

class SECTNDocument: public CDocument

SECTNDocument is a CDocument replacement that adds automatic thumbnailing to your document’s Serialize routine.

Defined in: SECTNDOC.H

Comments

First, SECTNDocument calls  GetThumbNailView to obtain the view to thumbnail. By default this is the first view in the document’s list of views.

After obtaining a pointer to the view to thumbnail, SECTNDocument calls the view’s GetThumbNailBitmap routine which eventually calls the OnDraw routine causing the view to draw itself into a thumbnail bitmap. This bitmap is prepended to the application-specific serialized data by SECTNDocument during the Serialize calls. Therefore, if you override SECTNDocument:: Serialize, it is very important to be sure to place a call to the base class’s Serialize member function before serializing your application-specific data.

When de-serializing, or reading, SECTNDocument:: Serialize knows to skip over the thumbnail image and just read in the application-specific data.

The THUMBNL sample in the \SAMPLES\TOOLKIT\STANDARD\UIEXT\THUMBNL directory demonstrates how to use SECTNDocument and the other thumbnailing support classes.

See Also

SECTNBitmap @xref SECTNDC @xref SECTNFileDialog @xref SECTNView @xref SECTNWinApp

Class Members

Protected Members

virtual SECTNView *  GetThumbNailView()

Gets a pointer to the SECTNView that will create the thumbnail image.

Public Members

virtual void  Serialize(CArchive& ar)

Prepends the application-specific serialization data with a thumbnail image when writing.