CODDocViewAnchor Class

class CODDocViewAnchor: public CODAnchorSymbol

Provides a hyperlink to an MFC document.

This type of anchor symbol encapsulates an MFC document template and a document name. When the link is opened, the document template is used to open a document and view.

Defined in: OdAnchorSymbol.h

Class Members

VIEWS_API CODDocViewAnchor(CDocTemplate* pDocTemplate = NULL)

Constructor.

VIEWS_API CODDocViewAnchor(const CODDocViewAnchor& src)

Copy constructor.

VIEWS_API virtual ~CODDocViewAnchor()

Destructor.

VIEWS_API CODDocViewAnchor& operator=(const CODDocViewAnchor& src)

Assignment operator.

VIEWS_API virtual CODComponent* Dup() const

Create a duplicate copy of this object.

CDocTemplate* m_pDocTemplate

Pointer to the document template to link to.

CString m_strPathName

Name of document to link to.

CString m_strTitle

Document title.

VIEWS_API virtual CDocTemplate* GetDocTemplate()

Get the document template attached to this anchor.

VIEWS_API virtual void SetDocTemplate(CDocTemplate* pDocTemplate)

Set the document template to use for opening linked documents.

VIEWS_API virtual void SetPathName(LPCTSTR lpszPathName)

Set the path and file name.

VIEWS_API const CString& GetPathName() const

Return the path and file name.

VIEWS_API virtual void SetTitle(LPCTSTR lpszTitle)

Set the document title.

VIEWS_API const CString& GetTitle() const

Return the document title.

VIEWS_API virtual BOOL Open()

Open the named document using the given document template.

VIEWS_API virtual CDocument* GetDocument()

Return a pointer to the most recently opened document.

VIEWS_API virtual void Serialize(CArchive& ar)

Serialize the component.