COleDocObjectItem Class

Implements Active document containment.

class COleDocObjectItem : public COleClientItem

Members

Public Constructors

Name

Description

COleDocObjectItem::COleDocObjectItem

Constructs a COleDocObject item.

Public Methods

Name

Description

COleDocObjectItem::DoDefaultPrinting

Prints the container application's document using the default printer settings.

COleDocObjectItem::ExecCommand

Executes the command specified by the user.

COleDocObjectItem::GetActiveView

Retrieves the document's active view.

COleDocObjectItem::GetPageCount

Retrieves the number of pages in the container application's document.

COleDocObjectItem::OnPreparePrinting

Prepares the container application's document for printing.

COleDocObjectItem::OnPrint

Prints the container application's document.

COleDocObjectItem::QueryCommand

Queries for the status of one or more commands generated by user interface events.

COleDocObjectItem::Release

Releases the connection to an OLE linked item and closes it if it was open. Does not destroy the client item.

Remarks

In MFC, an Active document is handled similarly to a regular, in-place editable embedding, with the following differences:

  • The COleDocument-derived class still maintains a list of the currently embedded items; however, these items may be COleDocObjectItem-derived items.

  • When an active document is active, it occupies the entire client area of the view when it is in-place active.

  • An Active document container has full control of the Help menu.

  • The Help menu contains menu items for both the Active document container and server.

Because the Active document container owns the Help menu, the container is responsible for forwarding server Help menu messages to the server. This integration is handled by COleDocObjectItem.

For more information on menu merging and Active document activation, see Overview of Active Document Containment.

Inheritance Hierarchy

CObject

CCmdTarget

CDocItem

COleClientItem

COleDocObjectItem

Requirements

Header: afxole.h

See Also

Reference

COleClientItem Class

Hierarchy Chart

COleClientItem Class

CDocObjectServerItem Class

Concepts

MFC Sample MFCBIND