Share via


CSingleDocTemplate

This class defines a document template that implements the single document interface (SDI). An SDI application uses the main frame window to display a document; only one document can be open at a time.

A document template defines the relationship between three types of classes:

  • A document class, which you derive from CDocument.
  • A view class, which displays data from the document class listed above. You can derive this class from CView, CScrollView, CFormView, or CEditView. You can also use CEditView directly.
  • A frame window class, which contains the view. For an SDI document template, you can derive this class from CFrameWnd; if you do not need to customize the behavior of the main frame window, you can use CFrameWnd directly without deriving your own class.

An SDI application typically supports one type of document, so it has only one CSingleDocTemplate object. Only one document can be open at a time.

You do not need to call any methods of CSingleDocTemplate except the constructor. The framework handles CSingleDocTemplate objects internally.

Requirements

**  Windows CE versions:** 1.0 and later  
  Header file: Declared in Afxwin.h
  Platform: H/PC Pro, Palm-size PC, Pocket PC

See Also

CDocTemplate, CDocument, CFrameWnd, CView, CWinApp, Application Architecture Classes