Skip to content

Commit 24e40a5

Browse files
author
mtx48109
committed
changes per comment
1 parent ac69e27 commit 24e40a5

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

docs/mfc/active-document-containers.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ An active document container, such as Microsoft Office Binder or Internet Explor
3737

3838
An active document container that integrates active documents must:
3939

40-
- Be capable of handling object storage through the **IPersistStorage** interface, that is, it must provide an **IStorage** instance to each active document.
40+
- Be capable of handling object storage through the `IPersistStorage` interface, that is, it must provide an `IStorage` instance to each active document.
4141

42-
- Support the basic embedding features of OLE documents, necessitating "site" objects (one per document or embedding) that implement **IOleClientSite** and **IAdviseSink**.
42+
- Support the basic embedding features of OLE documents, necessitating "site" objects (one per document or embedding) that implement `IOleClientSite` and `IAdviseSink`.
4343

44-
- Support in-place activation of embedded objects or active documents. The container's site objects must implement **IOleInPlaceSite** and the container's frame object must provide **IOleInPlaceFrame**.
44+
- Support in-place activation of embedded objects or active documents. The container's site objects must implement `IOleInPlaceSite` and the container's frame object must provide `IOleInPlaceFrame`.
4545

46-
- Support the active documents' extensions by implementing **IOleDocumentSite** to provide the mechanism for the container to talk to the document. Optionally, the container can implement the active document interfaces **IOleCommandTarget** and **IContinueCallback** to pick up simple commands such as printing or saving.
46+
- Support the active documents' extensions by implementing `IOleDocumentSite` to provide the mechanism for the container to talk to the document. Optionally, the container can implement the active document interfaces `IOleCommandTarget` and `IContinueCallback` to pick up simple commands such as printing or saving.
4747

48-
The frame object, the view objects, and the container object can optionally implement **IOleCommandTarget** to support the dispatch of certain commands, as discussed in [Command Targets](../mfc/message-handling-and-command-targets.md). View and container objects can also optionally implement **IPrint** and **IContinueCallback**, to support programmatic printing, as discussed in [Programmatic Printing](../mfc/programmatic-printing.md).
48+
The frame object, the view objects, and the container object can optionally implement `IOleCommandTarget` to support the dispatch of certain commands, as discussed in [Command Targets](../mfc/message-handling-and-command-targets.md). View and container objects can also optionally implement `IPrint` and `IContinueCallback`, to support programmatic printing, as discussed in [Programmatic Printing](../mfc/programmatic-printing.md).
4949

5050
The following figure shows the conceptual relationships between a container and its components (at left), and the active document and its views (at right). The active document manages storage and data, and the view displays or optionally prints that data. Interfaces in bold are those required for active document participation; those bold and italic are optional. All other interfaces are required.
5151

@@ -67,14 +67,14 @@ An active document container, such as Microsoft Office Binder or Internet Explor
6767
The document site is conceptually the container for one or more "view site" objects. Each view site object is associated with individual view objects of the document managed by the document site. If the container only supports a single view per document site, then it can implement the document site and the view site with a single concrete class.
6868

6969
## <a name="view_site_objects"></a> View Site Objects
70-
A container's view site object manages the display space for a particular view of a document. In addition to supporting the standard **IOleInPlaceSite** interface, a view site also generally implements **IContinueCallback** for programmatic printing control. (Note that the view object never queries for **IContinueCallback** so it can actually be implemented on any object the container desires.)
70+
A container's view site object manages the display space for a particular view of a document. In addition to supporting the standard `IOleInPlaceSite` interface, a view site also generally implements **IContinueCallback** for programmatic printing control. (Note that the view object never queries for `IContinueCallback` so it can actually be implemented on any object the container desires.)
7171

72-
A container that supports multiple views must be able to create multiple view site objects within the document site. This provides each view with separate activation and deactivation services as provided through **IOleInPlaceSite**.
72+
A container that supports multiple views must be able to create multiple view site objects within the document site. This provides each view with separate activation and deactivation services as provided through `IOleInPlaceSite`.
7373

7474
## <a name="frame_object"></a> Frame Object
75-
The container's frame object is, for the most part, the same frame that is used for in-place activation in OLE Documents, that is, the one that handles menu and toolbar negotiation. A view object has access to this frame object through **IOleInPlaceSite::GetWindowContext**, which also provides access to the container object representing the container document (which can handle pane-level toolbar negotiation and contained object enumeration).
75+
The container's frame object is, for the most part, the same frame that is used for in-place activation in OLE Documents, that is, the one that handles menu and toolbar negotiation. A view object has access to this frame object through `IOleInPlaceSite::GetWindowContext`, which also provides access to the container object representing the container document (which can handle pane-level toolbar negotiation and contained object enumeration).
7676

77-
An active document container can augment the frame by adding **IOleCommandTarget**. This allows it to receive commands that originate in the active document's user interface in the same way that this interface can allow a container to send the same commands (such as **File New**, **Open**, **Save As**, **Print**; **Edit Copy**, **Paste**, **Undo**, and others) to an active document. For more information, see [Command Targets](../mfc/message-handling-and-command-targets.md).
77+
An active document container can augment the frame by adding `IOleCommandTarget`. This allows it to receive commands that originate in the active document's user interface in the same way that this interface can allow a container to send the same commands (such as **File New**, **Open**, **Save As**, **Print**; **Edit Copy**, **Paste**, **Undo**, and others) to an active document. For more information, see [Command Targets](../mfc/message-handling-and-command-targets.md).
7878

7979
## See Also
8080
[Active Document Containment](../mfc/active-document-containment.md)

docs/mfc/active-documents.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ ms.workload: ["cplusplus"]
1414
# Active Documents
1515
Active documents extend the compound document technology of OLE. These extensions are provided in the form of additional interfaces that manage views, so that objects can function within containers and yet retain control over their display and printing functions. This process makes it possible to display documents both in foreign frames (such as the Microsoft Office Binder or Microsoft Internet Explorer) and in native frames (such as the product's own view ports).
1616

17-
This section describes the functional [requirements for active documents](#requirements_for_active_documents). The active document owns a set of data and has access to storage where the data can be saved and retrieved. It can create and manage one or more views on its data. In addition to supporting the usual embedding and in-place activation interfaces of OLE documents, the active document communicates its ability to create views through **IOleDocument**. Through this interface, the container can ask to create (and possibly enumerate) the views that the active document can display. Through this interface, the active document can also provide miscellaneous information about itself, such as whether it supports multiple views or complex rectangles.
17+
This section describes the functional [requirements for active documents](#requirements_for_active_documents). The active document owns a set of data and has access to storage where the data can be saved and retrieved. It can create and manage one or more views on its data. In addition to supporting the usual embedding and in-place activation interfaces of OLE documents, the active document communicates its ability to create views through `IOleDocument`. Through this interface, the container can ask to create (and possibly enumerate) the views that the active document can display. Through this interface, the active document can also provide miscellaneous information about itself, such as whether it supports multiple views or complex rectangles.
1818

19-
The following is the `IOleDocument` interface. Note that the **IEnumOleDocumentViews** interface is a standard OLE enumerator for **IOleDocumentView \*** types.
19+
The following is the `IOleDocument` interface. Note that the `IEnumOleDocumentViews` interface is a standard OLE enumerator for `IOleDocumentView \*` types.
2020

2121
```
2222
interface IOleDocument : IUnknown
@@ -42,20 +42,20 @@ interface IOleDocument : IUnknown
4242
## <a name="requirements_for_active_documents"></a> Requirements for Active Documents
4343
An active document that can be displayed in an active document container must:
4444

45-
- Use OLE's Compound Files as its storage mechanism by implementing **IPersistStorage**.
45+
- Use OLE's Compound Files as its storage mechanism by implementing `IPersistStorage`.
4646

47-
- Support the basic embedding features of OLE Documents, including **Create From File**. This necessitates the interfaces **IPersistFile**, **IOleObject**, and **IDataObject**.
47+
- Support the basic embedding features of OLE Documents, including **Create From File**. This necessitates the interfaces `IPersistFile`, `IOleObject`, and `IDataObject`.
4848

49-
- Support one or more views, each of which is capable of in-place activation. That is, the views must support the interface **IOleDocumentView** as well as the interfaces **IOleInPlaceObject** and **IOleInPlaceActiveObject** (using the container's **IOleInPlaceSite** and **IOleInPlaceFrame** interfaces).
49+
- Support one or more views, each of which is capable of in-place activation. That is, the views must support the interface `IOleDocumentView` as well as the interfaces `IOleInPlaceObject` and `IOleInPlaceActiveObject` (using the container's `IOleInPlaceSite` and `IOleInPlaceFrame` interfaces).
5050

51-
- Support the standard active document interfaces **IOleDocument**, **IOleCommandTarget**, and **IPrint**.
51+
- Support the standard active document interfaces `IOleDocument`, `IOleCommandTarget`, and `IPrint`.
5252

5353
Knowledge of when and how to use the container-side interfaces is implied in these requirements.
5454

5555
## <a name="requirements_for_view_objects"></a> Requirements for View Objects
56-
An active document can create one or more views of its data. Functionally, these views are like ports onto a particular method for displaying the data. If an active document only supports a single view, the active document and that single view can be implemented using a single class. **IOleDocument::CreateView** returns the same object's **IOleDocumentView** interface pointer.
56+
An active document can create one or more views of its data. Functionally, these views are like ports onto a particular method for displaying the data. If an active document only supports a single view, the active document and that single view can be implemented using a single class. `IOleDocument::CreateView` returns the same object's `IOleDocumentView` interface pointer.
5757

58-
To be represented within an active document container, a view component must support **IOleInPlaceObject** and **IOleInPlaceActiveObject** in addition to `IOleDocumentView`:
58+
To be represented within an active document container, a view component must support `IOleInPlaceObject` and `IOleInPlaceActiveObject` in addition to `IOleDocumentView`:
5959

6060
```
6161
interface IOleDocumentView : IUnknown
@@ -82,13 +82,13 @@ interface IOleDocumentView : IUnknown
8282
}
8383
```
8484

85-
Every view has an associated view site, which encapsulates the view frame and the view port (HWND and a rectangular area in that window). The site exposes this functionality though the standard **IOleInPlaceSite** interface. Note that it is possible to have more than one view port on a single HWND.
85+
Every view has an associated view site, which encapsulates the view frame and the view port (HWND and a rectangular area in that window). The site exposes this functionality though the standard `IOleInPlaceSite` interface. Note that it is possible to have more than one view port on a single HWND.
8686

87-
Typically, each type of view has a different printed representation. Hence views and the corresponding view sites should implement the printing interfaces if **IPrint** and **IContinueCallback**, respectively. The view frame must negotiate with the view provider through **IPrint** when printing begins, so that headers, footers, margins, and related elements are printed correctly. The view provider notifies the frame of printing-related events through **IContinueCallback**. For more information on the use of these interfaces, see [Programmatic Printing](../mfc/programmatic-printing.md).
87+
Typically, each type of view has a different printed representation. Hence views and the corresponding view sites should implement the printing interfaces if `IPrint` and `IContinueCallback`, respectively. The view frame must negotiate with the view provider through `IPrint` when printing begins, so that headers, footers, margins, and related elements are printed correctly. The view provider notifies the frame of printing-related events through `IContinueCallback`. For more information on the use of these interfaces, see [Programmatic Printing](../mfc/programmatic-printing.md).
8888

89-
Note that if an active document only supports a single view, then the active document and that single view can be implemented using a single concrete class. **IOleDocument::CreateView** simply returns the same object's **IOleDocumentView** interface pointer. In short, it is not necessary that there be two separate object instances when only one view is required.
89+
Note that if an active document only supports a single view, then the active document and that single view can be implemented using a single concrete class. `IOleDocument::CreateView` simply returns the same object's `IOleDocumentView` interface pointer. In short, it is not necessary that there be two separate object instances when only one view is required.
9090

91-
A view object can also be a command target. By implementing **IOleCommandTarget** a view can receive commands that originate in the container's user interface (such as **New**, **Open**, **Save As**, **Print** on the **File** menu; and **Copy**, **Paste**, **Undo** on the **Edit** menu). For more information, see [Message Handling and Command Targets](../mfc/message-handling-and-command-targets.md).
91+
A view object can also be a command target. By implementing `IOleCommandTarget` a view can receive commands that originate in the container's user interface (such as **New**, **Open**, **Save As**, **Print** on the **File** menu; and **Copy**, **Paste**, **Undo** on the **Edit** menu). For more information, see [Message Handling and Command Targets](../mfc/message-handling-and-command-targets.md).
9292

9393
## See Also
9494
[Active Document Containment](../mfc/active-document-containment.md)

0 commit comments

Comments
 (0)