Customizing Code Windows by Using the Legacy API

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

A code window is a document window object that supports one or more text views. The exact features of a code window depend on the associated language service. In multiple-document interface (MDI) mode, the code window is the MDI child frame.

Code windows are controlled by language services, and each language service can provide its own code window manager. This enables the language service to add its own adornments to the code window, such as squiggles, colorization, and more. For more information about how to create a core window, see Instantiating the Core Editor By Using the Legacy API.

A code window is an IVsWindowFrame object that has a text view and any adornments sited in the object. When you create the code window during your instantiation of the core editor, your language service can attach an IVsCodeWindowManager to the code window, as is shown in the following illustration.

CodeWindow graphic
Code window

The language service implements the code window manager and is responsible for managing adornments, such as a drop-down bar. The code window calls the AddAdornments method during code window initialization. When this call is made, the language service can add a drop-down bar or a button bar (IVsButtonBarClient) to the code window.

In This Section

Customizing Code Windows by Using the Legacy API
Explains how to customize code windows using the legacy API.

How to: Host An Editor in Another Editor
Explains how to host a second editor inside an editor window.

How to: Fire Events When the Editor Loses Focus
Explains how to attach a document view to a document data object.

See Also

VsCodeWindow
IVsTextView
VsTextBuffer
VsTextView
Instantiating the Core Editor By Using the Legacy API
Accessing theText View by Using the Legacy API