home     download     screen shots     bugs     mailing list     example output     generated MFC docs     help     tools and utilities


 Overview   Project   Class   Tree   Index 
MFC Class Library
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

MFC
Class CDocument

CObject
   |
   +--CCmdTarget
         |
         +--CDocument

   in AFXWIN.H
Direct Known Subclasses:
COleDocument

class CDocument
extends CCmdTarget

class CDocument is the main document data abstraction


Field Summary
 BOOL m_bAutoDelete
          
 BOOL m_bEmbedded
          
protected BOOL m_bModified
          
protected CDocTemplate* m_pDocTemplate
          
protected CString m_strPathName
          
protected CString m_strTitle
          
protected CPtrList m_viewList
          
protected static AFX_CORE_DATA const AFX_MSGMAP messageMap
          
   
Fields inherited from class CCmdTarget
messageMap, commandMap, dispatchMap, connectionMap, interfaceMap, eventsinkMap, m_dwRef, m_pOuterUnknown, m_xInnerUnknown, m_xDispatch, m_bResultExpected, m_xConnPtContainer
   
Fields inherited from class CObject
classCObject
 
Constructor Summary
CDocument()
          
virtual ~CDocument()
          
 
Method Summary
 void AddView( CView* pView )
          
 virtual BOOL CanCloseFrame( CFrameWnd* pFrame )
          
 virtual void DeleteContents()
          
 void DisconnectViews()
          
 virtual BOOL DoFileSave()
          
 virtual BOOL DoSave( LPCTSTR lpszPathName, BOOL bReplace = TRUE )
          
 virtual HACCEL GetDefaultAccelerator()
          
 virtual HMENU GetDefaultMenu()
          
 CDocTemplate* GetDocTemplate() const
          
 virtual CFile* GetFile( LPCTSTR lpszFileName, UINT nOpenFlags, CFileException* pError )
          
 virtual POSITION GetFirstViewPosition() const
          
protected virtual const AFX_MSGMAP* GetMessageMap() const
          
 virtual CView* GetNextView( POSITION& rPosition ) const
          
 const CString& GetPathName() const
          
 const CString& GetTitle() const
          
 virtual BOOL IsModified()
          
 virtual void OnChangedViewList()
          
 virtual void OnCloseDocument()
          
 virtual BOOL OnCmdMsg( UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo )
          
protected void OnFileClose()
          
protected void OnFileSave()
          
protected void OnFileSaveAs()
          
protected void OnFileSendMail()
          
 virtual void OnFinalRelease()
          
 virtual void OnIdle()
          
 virtual BOOL OnNewDocument()
          
 virtual BOOL OnOpenDocument( LPCTSTR lpszPathName )
          
 virtual BOOL OnSaveDocument( LPCTSTR lpszPathName )
          
protected void OnUpdateFileSendMail( CCmdUI* pCmdUI )
          
 virtual void PreCloseFrame( CFrameWnd* pFrame )
          
 virtual void ReleaseFile( CFile* pFile, BOOL bAbort )
          
 void RemoveView( CView* pView )
          
 virtual void ReportSaveLoadException( LPCTSTR lpszPathName, CException* e, BOOL bSaving, UINT nIDPDefault )
          
 virtual BOOL SaveModified()
          
 void SendInitialUpdate()
          
 virtual void SetModifiedFlag( BOOL bModified = TRUE )
          
 virtual void SetPathName( LPCTSTR lpszPathName, BOOL bAddToMRU = TRUE )
          
 virtual void SetTitle( LPCTSTR lpszTitle )
          
 void UpdateAllViews( CView* pSender, LPARAM lHint = 0L, CObject* pHint = NULL )
          
 virtual void UpdateFrameCounts()
          
   
Methods inherited from class CCmdTarget
GetIDispatch, FromIDispatch, IsResultExpected, EnableAutomation, EnableConnections, BeginWaitCursor, EndWaitCursor, RestoreWaitCursor, EnumOleVerbs, DoOleVerb, OnCmdMsg, OnFinalRelease, IsInvokeAllowed, EnableTypeLib, GetTypeInfoOfGuid, GetDispatchIID, GetTypeInfoCount, GetTypeLibCache, GetTypeLib, GetNotSupported, SetNotSupported, GetRoutingView, GetRoutingFrame, GetRoutingView_, GetRoutingFrame_, GetMessageMap, GetCommandMap, GetDispatchMap, GetConnectionMap, GetInterfaceMap, GetEventSinkMap, EnableAggregation, ExternalDisconnect, GetControllingUnknown, InternalQueryInterface, InternalAddRef, InternalRelease, ExternalQueryInterface, ExternalAddRef, ExternalRelease, GetInterface, QueryAggregates, OnCreateAggregates, GetInterfaceHook, GetStandardProp, SetStandardProp, GetEntryCount, GetDispEntry, MemberIDFromName, GetStackSize, PushStackArgs, CallMemberFunc, OnEvent, GetEventSinkEntry, GetExtraConnectionPoints, GetConnectionHook
   
Methods inherited from class CObject
GetRuntimeClass, new, new, delete, IsSerializable, IsKindOf, Serialize
 

Field Detail

m_bAutoDelete

public BOOL m_bAutoDelete;

m_bEmbedded

public BOOL m_bEmbedded;

m_bModified

protected BOOL m_bModified;

m_pDocTemplate

protected CDocTemplate* m_pDocTemplate;

m_strPathName

protected CString m_strPathName;

m_strTitle

protected CString m_strTitle;

m_viewList

protected CPtrList m_viewList;

messageMap

protected static AFX_CORE_DATA const AFX_MSGMAP messageMap;


Constructor Detail

CDocument

public CDocument();

~CDocument

public virtual ~CDocument();


Method Detail

AddView

public void AddView( CView* pView );

CanCloseFrame

public virtual BOOL CanCloseFrame( CFrameWnd* pFrame );

DeleteContents

public virtual void DeleteContents();

DisconnectViews

public void DisconnectViews();

DoFileSave

public virtual BOOL DoFileSave();

DoSave

public virtual BOOL DoSave( LPCTSTR lpszPathName, BOOL bReplace = TRUE );

GetDefaultAccelerator

public virtual HACCEL GetDefaultAccelerator();

GetDefaultMenu

public virtual HMENU GetDefaultMenu();

GetDocTemplate

public CDocTemplate* GetDocTemplate() const;

GetFile

public virtual CFile* GetFile( LPCTSTR lpszFileName, UINT nOpenFlags, CFileException* pError );

GetFirstViewPosition

public virtual POSITION GetFirstViewPosition() const;

GetMessageMap

protected virtual const AFX_MSGMAP* GetMessageMap() const;

GetNextView

public virtual CView* GetNextView( POSITION& rPosition ) const;

GetPathName

public const CString& GetPathName() const;

GetTitle

public const CString& GetTitle() const;

IsModified

public virtual BOOL IsModified();

OnChangedViewList

public virtual void OnChangedViewList();

OnCloseDocument

public virtual void OnCloseDocument();

OnCmdMsg

public virtual BOOL OnCmdMsg( UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo );

OnFileClose

protected void OnFileClose();

OnFileSave

protected void OnFileSave();

OnFileSaveAs

protected void OnFileSaveAs();

OnFileSendMail

protected void OnFileSendMail();

OnFinalRelease

public virtual void OnFinalRelease();

OnIdle

public virtual void OnIdle();

OnNewDocument

public virtual BOOL OnNewDocument();

OnOpenDocument

public virtual BOOL OnOpenDocument( LPCTSTR lpszPathName );

OnSaveDocument

public virtual BOOL OnSaveDocument( LPCTSTR lpszPathName );

OnUpdateFileSendMail

protected void OnUpdateFileSendMail( CCmdUI* pCmdUI );

PreCloseFrame

public virtual void PreCloseFrame( CFrameWnd* pFrame );

ReleaseFile

public virtual void ReleaseFile( CFile* pFile, BOOL bAbort );

RemoveView

public void RemoveView( CView* pView );

ReportSaveLoadException

public virtual void ReportSaveLoadException( LPCTSTR lpszPathName, CException* e, BOOL bSaving, UINT nIDPDefault );

SaveModified

public virtual BOOL SaveModified();

SendInitialUpdate

public void SendInitialUpdate();

SetModifiedFlag

public virtual void SetModifiedFlag( BOOL bModified = TRUE );

SetPathName

public virtual void SetPathName( LPCTSTR lpszPathName, BOOL bAddToMRU = TRUE );

SetTitle

public virtual void SetTitle( LPCTSTR lpszTitle );

UpdateAllViews

public void UpdateAllViews( CView* pSender, LPARAM lHint = 0L, CObject* pHint = NULL );

UpdateFrameCounts

public virtual void UpdateFrameCounts();

 Overview   Project   Class   Tree   Index 
MFC Class Library
CppDoc v2.3.1
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD