This documentation is archived and is not being maintained.

CSingleDocTemplate Class

Defines a document template that implements the single document interface (SDI).

class CSingleDocTemplate : public CDocTemplate

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 don't need to call any member functions of CSingleDocTemplate except the constructor. The framework handles CSingleDocTemplate objects internally.

For more information on using CSingleDocTemplate, see Document Templates and the Document/View Creation Process.

Header: afxwin.h