ITextDocument2 interface

Extends the ITextDocument interface, adding methods that enable the Input Method Editor (IME) to drive the rich edit control, and methods to retrieve other interfaces such as ITextDisplays, ITextRange2, ITextFont2, ITextPara2, and so on.

Some ITextDocument2 methods used with the IME need access to the current window handle (HWND). Use the ITextDocument2::GetWindow method to retrieve the handle.

When to implement

Applications typically don't implement the ITextDocument2 interface. Microsoft text solutions, such as rich edit controls, implement ITextDocument2 as part of their TOM implementation.

When to use

Applications can retrieve an ITextDocument2 pointer from a rich edit control. To do this, send an EM_GETOLEINTERFACE message to retrieve an IRichEditOle object from a rich edit control. Then, call the object's IUnknown::QueryInterface method to retrieve an ITextDocument2 pointer.

Members

The ITextDocument2 interface inherits from ITextDocument. ITextDocument2 also has these types of members:

Methods

The ITextDocument2 interface has these methods.

MethodDescription
AttachMsgFilter

Attaches a new message filter to the edit instance. All window messages that the edit instance receives are forwarded to the message filter.

CheckTextLimit

Checks whether the number of characters to be added would exceed the maximum text limit.

GetActiveStory

Gets the active story; that is, the story that receives keyboard and mouse input.

GetCallManager

Gets the call manager.

GetCaretType

Gets the caret type.

GetClientRect

Retrieves the client rectangle of the rich edit control.

GetDisplays

Gets the displays collection for this TOM engine instance.

GetDocumentFont

Gets an object that provides the default character format information for this instance of the TOM engine.

GetDocumentPara

Gets an object that provides the default paragraph format information for this instance of the TOM engine.

GetEastAsianFlags

Gets the East Asian flags.

GetEffectColor

Retrieves the color used for special text attributes.

GetGenerator

Gets the name of the TOM engine.

GetImmContext

Gets the IMM input context from the TOM host.

GetMainStory

Gets the main story.

GetMathProperties

Gets the math properties for the document.

GetNewStory

Gets a new story.

GetNotificationMode

Gets the notification mode.

GetPreferredFont

Retrieves the preferred font for a particular character repertoire and character position.

GetProperty

Retrieves the value of a property.

GetSelection2

Gets the active selection.

GetStory

Retrieves the story that corresponds to a particular index.

GetStoryRanges2

Gets an object for enumerating the stories in a document.

GetStrings

Gets a collection of rich-text strings.

GetTypographyOptions

Gets the typography options.

GetVersion

Gets the version number of the TOM engine.

GetWindow

Gets the handle of the window that the TOM engine is using to display output.

Notify

Notifies the TOM engine client of particular IME events.

Range2

Retrieves a new text range for the active story of the document.

RangeFromPoint2

Retrieves the degenerate range at (or nearest to) a particular point on the screen.

ReleaseCallManager

Releases the call manager.

ReleaseImmContext

Releases an IMM input context.

SetActiveStory

Sets the active story; that is, the story that receives keyboard and mouse input.

SetCaretType

Sets the caret type.

SetDocumentFont

Sets the default character formatting for this instance of the TOM engine.

SetDocumentPara

Sets the default paragraph formatting for this instance of the TOM engine.

SetEffectColor

Specifies the color to use for special text attributes.

SetIMEInProgress

Sets the state of the IME in-progress flag.

SetMathProperties

Specifies the math properties to use for the document.

SetNotificationMode

Sets the notification mode.

SetProperty

Specifies a new value for a property.

SetTypographyOptions

Specifies the typography options for the document.

SysBeep

Generates a system beep.

Update

Updates the selection and caret.

UpdateWindow

Notifies the client that the view has changed and the client should update the view if the TOM engine is in-place active.

 

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Tom.h

DLL

Msftedit.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft