Text Services Framework

Purpose

Microsoft® Windows® Text Services Framework (TSF) is a system service included in Whistler and later versions of the Microsoft® Windows® operating system. TSF provides a simple and scalable framework for the delivery of advanced text input and natural language technologies. TSF can be enabled in applications, or as TSF Text Services. TSF Text Services provide multilanguage support and deliver text services such as handwriting recognition and speech recognition.

Where Applicable

Text Services Framework is applicable for Windows-based computers using text services and Whistler or later versions of the operating system.

Developer Audience

Text Services Framework is designed for use by COM programmers using languages including C, C++, and Microsoft® Visual Basic®. Programmers should be familiar with text services for Windows-based computers. Knowledge of handwriting recognition, speech recognition, and programming for multilanguage support is recommended.

Run-Time Requirements

Text Services Framework runs on the Microsoft Whistler Beta 2 operating system. It is available as a redistributable for Microsoft Windows 98, Windows Me, Windows NT 4.0, and Windows 2000. For more information about the requirements of specific API elements, see the Requirements section in the reference documentation.

Overview

General information about the Text Services Framework.

Reference

Documentation about Text Services Framework interfaces, methods, structures, and other code elements.

Feedback

Make error reports and feature requests directly to Microsoft.

Microsoft Platform SDK, February 2001 Edition.
This content last built on Thursday, February 01, 2001.


Legal Information

Text Services Framework

This is a preliminary document and may be changed substantially prior to final commercial release of the software described herein.

The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.

This documentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE INFORMATION IN THIS DOCUMENT.

Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

The example companies, organizations, products, people, and events depicted herein are fictitious. No association with any real company, organization, product, person, or event is intended or should be inferred.

© 2001 Microsoft Corporation. All rights reserved.

Microsoft, Active Accessibility, Bookshelf, Outlook, PhotoDraw, PowerPoint, Win32, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

The names of actual companies and products mentioned herein may be the trademarks of their respective owners.


About Text Services Framework

[This is preliminary documentation and subject to change.]

Microsoft® Windows® Text Services Framework (TSF) is an application programming interface (API) that enables advanced text input and natural language technologies. TSF exposes its framework to applications and text services through a set of COM interfaces.

This section includes the Text Services Framework with the following topics.

  • What is Text Services Framework?
  • Why use Text Services Framework?
  • Getting Started with Text Services Framework
  • Architecture
  • Technical Concepts


What is Text Services Framework?

Text Services Framework is a device independent, language neutral, and extensible system for text delivery and language technologies. TSF-enabled applications can access any text service that supports TSF. Text services include speech and handwriting recognition services and spelling-checker and grammar-checker services.

Text Services Framework includes the following major parts.

  • TSF-enabled Application. An application that interfaces with the TSF Framework.
  • TSF Provides an interface between TSF Text Services and a TSF-enabled application. In addition to accepting input from TSF Text Services, TSF also responds to changes within the document. This enables additional text services.
  • TSF Text Services. Provide multiple input editing features using TSF. Text services control soft keyboard input, speech recognition, text conversion, and text editing.

The following figure illustrates the TSF architecture.


Why Use Text Services Framework?

Text services replace input methods. Text Services Framework (TSF) provides for the accurate and complete text conversion. TSF does not require finalizing converted text strings and so does not separate its functionality into modes for input and modes for editing. TSF provides the user with continuous access to the document buffer. This modeless input architecture gives the buffered and accumulating text stream the capability to change dynamically. This makes keyboard input and text editing more efficient.

A universal soft keyboard. A soft keyboard that is displayed on-screen and can be manipulated with a mouse or other input device to create input events. TSF implements a universal soft keyboard for developers to use with their own TSF Text Services. The universal soft keyboard offers an alternative to developing a different soft keyboard to accompany each text service.

Input from many devices. TSF is device-neutral, and enables text services for multiple input devices including keyboard, mouse, pen, microphone, and Tablet PC.


Getting Started with Text Services Framework

TSF is intended for use by developers of applications and TSF Text Services. Knowledge of the Component Object Model (COM) and C++ programming for Windows-based computers is assumed.

This documentation also assumes a basic familiarity with computer text services, including text input methodologies. For reasons of scope and brevity, this documentation does not include full explanation of related technologies. Knowledge of input devices and natural language technologies such as speech recognition is assumed. Knowledge of text input application programming interfaces (APIs), such as Input Method Editors (IMEs), is helpful.


Architecture

Text Services Framework (TSF) consists of an applications programming interface (API) with programming elements in three major divisions. Each of the following divisions implements COM interfaces for accessing the objects that provide its functionality.

  • End-user applications (including controls) use part of the API to access and implement certain TSF objects. The discussion of TSF architecture calls such applications "TSF-enabled applications" or just "applications" when the context clearly involves TSF.
  • The TSF framework is an intermediary layer of the API to facilitate the sharing of data by TSF-enabled applications and text services. The discussion of TSF architecture calls this just the "framework" when the context clearly involves TSF.
  • Text services provide part of the API for special services such as keyboard input, speech and handwriting recognition, and spelling and grammar checking.

The following figure graphically shows the architectural divisions and shows some of the important objects in the divisions. The shaded portions of the figure represent specific TSF objects.

With this overall architecture for TSF, the framework provides an abstraction layer between applications and text services. This abstraction enables an application and text services to share a text store (text buffer), provides access by an application to multiple text services, and enables the framework to manage, and negotiate between, text services.

The following topics describe the TSF architecture.

  • Application
  • Framework
  • TSF Text Services
  • Text Stores


Application

In the Text Services Framework (TSF) architecture, a TSF-enabled application must implement a COM server for a TSF text store as part of its functionality. Applications can model the TSF text store in two ways.

Typically, applications use the ITextStoreACP interface to expose a text store based on the application character position (ACP). This interface is specifically designed for applications with a flat internal structure. Examples of applications that use this type of structure include Microsoft® Word and RichEdit. These applications perform more efficiently when character positions are referenced with integers.

Alternatively, applications use the ITextStoreAnchor interface to expose the text store. This interface uses a system of COM objects, called anchors, to reference text. This system is particularly suited to applications built on hierarchical data structures.

Applications must create one instance of the TSF framework for each thread in which they expose text. The TSF framework creates a document manager that, in turn, creates an input context to represent and control access to the text stream. The document manager controls the access of applications and TSF Text Services to the context.


Framework

The TSF framework uses a thread manager to mediate access to text stores through document managers. It also performs other thread management tasks, such as maintenance of thread focus. A document manager creates and manages input contexts. An application or text service can gain access to a text store only when a document manager grant a document lock for the context. To ensure high performance, the TSF API uses the COM model of event sink objects to handle notifications and events.

The following topics describe the details of the framework.

  • Thread Manager
  • Document Managers
  • Input Contexts
  • Document Locks
  • Events, Notifications, and Sinks


Thread Manager

The thread manager is the base component of the Text Services Framework (TSF) architecture. The thread manager performs common tasks related to thread management. These tasks include, but are not limited to, the activation and deactivation of TSF Text Services, the creation of document managers, and maintenance of the proper relationship between document contexts and the input focus. The following figures graphically show how the thread manager creates and manages multiple document managers.

The TSF thread manager is defined by the ITfThreadMgr interface. Moreover, the majority of the interfaces and objects in the TSF API can be obtained using the methods that the thread manager interface provides.

The thread manager also provides notification to clients, which can be either applications or text services. In TSF, notifications are provided by means of an event sink, which is a COM object. To receive notifications from the thread manager, a client must register an event sink object and specify the types of events to receive. Implement the ITfThreadMgrEventSink interface object to register your application to be notified of events related to the thread manager. TSF clients can register to receive thread manager events related to: establishing a document manager; the document manager receiving input focus; and granting a context. Clients must register separately to receive other notifications, such as those related to events concerning the text store.

TSF does not support free-threaded apartments, but uses multithreaded apartments. Typically, an implementation that uses multithreaded apartments could use an apartment-threaded server. TSF cannot, however, because the TSF API must support a Windows messaging queue to handle the input stream.


Document Managers

A document manager maintains a stack of input contexts. The default context stack includes a single input context activated to provide access to the default text store, which is in the framework. An application can add one additional context, which uses a text store in the application, to the stack.


Input Contexts

TSF uses text streams to contain data. COM objects called contexts describe these text streams. A context represents both the Unicode text in a stream and the properties that provide text markup data.

The context is an abstraction of the connection between a document manager and the document itself. This abstraction makes it possible for the framework, applications, and TSF Text Services to share access to documents.

TSF implements the ITfContext interface to describe a context. TSF Text Services are limited to indirectly accessing the text stream. They do this using methods supplied by the ITfContext interface methods, which access portions of the text stream described as ranges. For example, TSF Text Services read and write text by accessing ranges of text available through the following methods: ITfContextView::GetRangeFromPoint, ITfContext::GetSelection, ITfContext::GetStart, and ITfContext::GetEnd. TSF Text Services can indirectly select text in the text stream by using the ITfContext::SetSelection method.

Typically, applications own contexts. However, TSF Text Services and controls can also create their own contexts. Applications, TSF Text Services, and controls that create their own contexts must implement the ITfContextOwner interface, which describes a context owner.

TSF implements a partner to the ITfContextOwner interface, the ITfContextOwnerServices interface. It provides services related to managing the text store, including providing a way to use the application character position (ACP) to manage the text store. Applications use this interface to manage the text stores of the contexts they own. TSF Text Services and controls do not, generally, own contexts; instead of an ACP-based model for the text range, they use an anchor-based model.


Document Locks

The framework controls access to a text store for a document by requiring locks on operations. Locks are given for read-only access or for read-write access. A client (either an application or the framework) given a read-only lock cannot perform operations that modify document content. The only text store operation that does not require a lock is an operation performed to determine status using the ITextStoreACP::GetStatus and ITextStoreAnchor::GetStatus methods. The following table lists the text store methods that require a lock to perform their operations with the type of lock each requires.

Method | Type of lock required
GetStatus | none
GetSelection | read-only or read-write
GetText | read-only or read-write
GetEmbedded | read-only or read-write
GetEndACP | read-only or read-write
SetSelection | read-write
SetText | read-write
InsertEmbedded | read-write

A client can receive a read-write lock for an operation on a read-only document. But of the methods that require a read-write lock, only the SetSelection method can successfully complete an operation on a read-only document. Any other text store method attempting an operation on a read-only document will fail. In other words, text cannot be set, and inserts cannot be embedded, in a read-only document. Such attempts will fail with the method returning an error of TS_E_READONLY.


Events, Notifications, and Sinks

TSF provides a COM-based event architecture to handle events through a system of event sinks. Clients register specific event sinks to receive specific types of events.

An event sink object is a COM object that exposes appropriate COM interfaces. When a particular event occurs, the event sink architecture begins the notification process: an instance of the appropriate event sink class is created, requests are made to the appropriate interface, and the event method is executed. This event architecture is easily extended as new clients (applications or text services) register their own event sinks and select the types of notifications they must receive.

TSF is designed to use multithreaded event sinks. To support such an implementation, events can be synchronous or asynchronous.

A TSF client must register event sink objects to receive events and to obtain document locks. For clients intending to modify a document, the text store event sink is the most critical event sink. The text store event sink is accessed through either the ITextStoreACP interface or the ITextStoreAnchor interface.

TSF implements a notification process that is key to a client's ability to manipulate the text stream. TSF notifications signal a client of specific changes to the text stream. These changes are described as events. Events that cause a client to receive a notification include changes to the text stream such as text being selected, inserted, or deleted; changes to the location of the insertion point; and changes to the text layout. Notifications also grant locks to clients because clients must have the correct lock to perform an operation on a document. All clients must at least register a text store event sink, even if they do not require notification of events. This is because TSF requires that a client have a registered text store event sink in order to receive a document lock.

The text store event sink interface specifies a method that registers and unregisters a client to receive specific notifications. This interface also includes methods that notify clients about changes to text and changes to text layout. Most importantly, the text store interface ensures that clients receive notifications of document locks.


TSF Text Services

TSF Text Services are text services that support the Text Services Framework (TSF). TSF Text Services receive input or modify a data stream, typically while performing a translation task.

The framework manages the installation, registration, and activation of TSF Text Services. The framework also manages when application text can be changed and by which TSF Text Service. The framework can combine the results of several TSF Text Services and provide the rules by which multiple TSF Text Services interact and present their user interface elements.

TSF Text Services can read and write properties, and use ranges to do so. Ranges are structured around a series of COM objects called anchors. TSF Text Services must implement the ITextStoreAnchor interface to support the anchor-based model of the text store.

The following table describes some text services used in the TSF architecture.

Text services | Description
Handwriting recognition | Converts handwritten input into text. Typically requires that a user adapt to certain conventions in writing letter forms or that the user makes an investment of time to training TSF how to recognize his or her handwriting. Generally uses an input pad and pen device.
Input methods | Converts text composed from the Latin alphabet, or from various other double-byte or non-Latin scripts, into text strings composed of the appropriate characters for a specified language. Typically uses a soft keyboard manipulated on screen using a mouse. Can be used in conjunction with translation services.
Keyboard services | Provide keyboard input services for speakers of any modern language. Keyboard services are TSF-enabled services that foster input from any language through the keyboard. These services offer a high degree of flexibility. They can be combined with any other TSF Text Service to broaden the domain of supported text services. Keyboard services use keyboard devices.
Speech recognition | Converts speech to text. Typically requires the creation of a system file for each user. Uses a headset or other microphone.
Speech synthesis | Converts text to speech.
Spelling checker and grammar checker services | Checks text for accurate spelling and grammar.
Thesaurus | Provides dictionary lookup of synonyms for a specified word. Often used in conjunction with spelling and grammar services.
Translation services | Translates one language into another. Often used in conjunction with spelling and grammar services.


Text Stores

Text Services Framework (TSF) includes a text store that applications use to share text streams with text services.

By default, TSF uses a (default) text store in the framework when a text service requires one and an application has not created one (is not TSF-enabled). When an application creates a text store, the application implements the text store objects and is the server for the client framework.

The following topics describe how TSF represents text in text stores.

  • General Features
  • Regions
  • Anchors
  • Ranges
  • Embedded Objects
  • Attributes
  • Properties


General Features

The text store exposes documents as text streams that contain Unicode characters. A text stream of a document can also contain control codes that reference embedded content. TSF clients (applications or the framework) can read and modify the content of a document. The TSF text stream is a flat stream of Unicode characters. Either of two models can be used to implement the text store: an anchor-based model, or an application character position (ACP)-based model. The text store controls access to the text stream by using locks. Clients are sent messages about changes to the text stream after registering to receive notifications. Notifications of changes to the text stream are facilitated by the client registering an event sink, with TSF, to handle specific types of events. Notifications are also used in combination with locks to enable the client to operate on the text stream.


Regions

TSF clients can use regions to provide useful information about how to work with the text store. A region is a span of text handled as a unique editing range. Applications divide documents into regions based on their formatting. The formatting of a document provides information about how it should be edited.

For example, a document that contains a table consisting of four cells would constitute a single region by default. Another document that contains a similar table both preceded and followed by text would also, by default, constitute a single region. However, an application could also divide such a document into six regions: one region that contains the text preceding the table; four more regions, each of which contains one of the cells in the table; and a final region that contains the text following the table. Each of these regions, except for the last one which coincides with the end of the document, would be terminated by the placeholder character TS_CHAR_REGION.

Regions provide information about how to handle individual fields or cells within the document by showing them as distinct areas. Implementing regions in an application assists with reconversion, word breaking, and context searches. Applications can perform these operations more accurately and efficiently when they make use of the text-grouping capabilities of regions.

TSF does not require the use of regions. However, an application that does not implement regions must be able to handle them, even if the application will simply ignore them.

Both text store implementations, ACP-based and anchor-based,provide the capability to subdivide documents into regions. There are some differences in how regions are implemented in each model, however. In the ACP-based model, the ITextStoreACP::GetText method must be implemented to support regions. This method returns the TS_CHAR_REGION character to indicate the boundary of a region. In the anchor-based model, the methods IAnchor::Shift and IAnchor::ShiftRegion must be implemented to support regions. The Shift method is used to determine a boundary and stay within it. The ShiftRegion method is used to cross over the boundary of a region. Applications that implement an anchor-based text store but do not use regions should cause an error of E_NOTIMPL to be returned when a call to the ShiftRegion method is made.


Anchors

Text streams can have anchors. The effect of an anchor is modified by its properties. For more information about properties, see Properties.

Anchors have gravity. The gravity of an anchor determines how the anchor responds when text is inserted into the text stream at the position it marks. Consider the sentence: "It is cold today." Suppose that an anchor is inserted into this sentence, positioned before the word "cold":

It is <anchor>cold today.

If the user inserts the word "very" at the anchor position, the insertion can be made before the anchor, or after the anchor:

It is <anchor>very cold today.

– Or –

It is very <anchor>cold today.

In TSF, an anchor is a fixed index point in a text stream. For this reason, in a case where an insertion is made at the position of an anchor, an adjustment is forced in the position of the anchor. In the anchor model, the gravity property uses two flags to specify how the anchor is repositioned when an insertion is made at its position.

The TS_GR_BACKWARD flag moves the anchor backward in position so that the insertion follows:

It is <anchor>very cold today.

The TS_GR_FORWARD flag moves the anchor forward in position so that the insertion leads and the anchor follows:

It is very <anchor>cold today.


Ranges

Text has ranges. A range is an object that describes a span of text existing within the text stream. TSF Text Services use ranges to read, write, and manipulate text. A range is delimited by two anchors, one that marks the beginning of the range, another that marks its end.

Text ranges are not described by an offset into the text stream. Instead, they reference a specific span of text. Because they are associated with a specific span of text, ranges remain with the associated text.

For example, suppose that the word "nice" in the following sentence is described as a range:

The weather is <a-start>nice<a-end> today.

The <a-start> notation marks the start of the range. The <a-end> notation marks the end of the range. Because ranges stay with the text they delimit, if the word "very" is inserted before the word "nice," the starting anchor will stay with its current text range following the word "very." In a model where a range was marked by an offset into the text, the word "very" would become the word contained within the range; for example, in TSF this insertion operation results in:

The weather is very <a-start>nice<a-end> today.

The insertion operation will not yield this result:

The weather is <a-start>very<a-end> nice today.

Additionally, a text range is always created by a starting delimiter followed by an ending delimiter. The ending anchor cannot be made to precede the starting anchor in a range.

The span of text delimited by the range can expand or contract as insertions and deletions are made. Such changes cause the range itself to expand or contract. But text ranges do not move with text that is cut from, or pasted to, the text stream.


Embedded Objects

TSF permits embedded objects in the text stream. Embedded objects can be inserted into the text stream using the value TS_CHAR_EMBEDDED. This value resolves to the Unicode object replacement character U+fffc, using hexadecimal notation. The GetText method can return the object replacement character when intermixed with other text. For example, the following graphic shows the rendering of an embedded object that represents the Japanese pictographic character hi, in combination with the sequence of Unicode characters that represent the English translation of the character: "Sun."

The lowest layer of the graphic shows the Unicode encoding of the text string. The intermediate layer shows that the Unicode character resolves to U+fffc, the object replacement character. The upper layer shows the translated text string, consisting of the word "Sun" followed by the Japanese character for sun, hi.

To resolve between the object replacement character and the object itself, TSF supplies the GetEmbedded method. The GetEmbedded method obtains an interface pointer to the TS_CHAR_EMBEDDED value in the text stream. The parameter acpPos specifies the offset of the TS_CHAR_EMBEDDED value in the text stream. The GetEmbedded method returns a value that corresponds to the character at this offset.


Attributes

The TSF text stream uses attributes to indicate how text should be displayed. Attributes function as a layer on top of plain text that exposes data about rich text formatting and other related text characteristics. An application exposes attributes using text store interfaces.

An attribute is identified by a globally unique identifier (GUID). TSF provides a predefined set of common text attributes to specify fonts and typefaces, such as bold, italic, and so on.

You can also create other attributes to use in your applications. The range of text marked by one attribute can overlap, or even nest, the range of text marked by another attribute; overlapping and nested attributes of the same type are also permitted.

Attributes are "flat." That is, most attributes specify one key characteristic to apply to the text. One attribute might specify the characteristic bold, another might specify the characteristic of the font Verdana, 12 point. But you can also layer or nest other attributes within an attribute.

Attributes are characterized by a common set of values manipulated using the ITfDisplayAttributeInfo and ITfDisplayAttributeProvider interfaces. TSF implements an ITfDisplayAttributeMgr interface used to manage display information. Applications implement the ITfDisplayAttributeNotifySink interface to register and receive notifications related to changes in display attributes.

Attributes can be specified to have default, or implied, values. When a document reports to an application what attributes it supports, the document can also include data about the implied values of those attributes. This action eliminates the need for method calls to gather data on attributes whose values have not changed. For example, a document has an italic attribute to apply to a font type. The implied value of this attribute is FALSE. In this case, the attribute Italic is only relevant over any text ranges where it is reported to be TRUE. TSF servers, however, do not use implied values. TSF servers always obtain the attribute value, even if it was reported by the document to be an implied value.

TSF supports a set of predefined text attributes that can be broken down into the following categories:

  • Attributes that describe text appearance and character formatting.
  • Attributes that describe the layout of a paragraph.
  • Attributes that describe text properties not related to appearance; for example, the language used to write the text or whether the text is read-only.
  • Attributes that describe application-specific information.

Dividing attributes into categories makes it easier to search for specific types of attributes. That is, an application can search for attributes contained in a document that relate to the appearance of the text. Although TSF supports categories of attributes, the use of categories is optional. An implementation of TSF can indicate support for categories by setting a flag in the document status field.


Properties

In contrast to attributes, exposed by an application through text store interfaces, properties are implemented by TSF through the ITfProperty interface. Properties typically specify metadata associated with the text store, including text style and language identification. Properties can also specify candidate lists or reading strings that provide data to other text services. Properties generally specify the display of text, provide data about the text owner, or contain the raw device data that is the text source.

The following topics describe properties in TSF:

  • Properties and Text
  • Properties in TSF Text Services and TSF-enabled Applications
  • Property Types


Properties and Text

The following illustration shows how different and overlapping properties can be layered onto a text string.

The TF_PROPERTYVAL structure is used to describe a property. Each property is identified by a globally unique identifier (GUID) specified by the guidId member of the TF_PROPERTYVAL structure. A property is obtained by specifying its GUID.

TSF defines four types of properties applied to text ranges.

Property | Description
GUID_PROP_TEXTOWNER | Identifies the text owner. TSF tracks and updates this property.
GUID_PROP_ATTRIBUTE | Stores attribute data on a per-character basis. This GUID specifies a static property.
GUID_PROP_LANGID | Stores data about language identification on a per-character basis. This GUID specifies a static compact property.
GUID_PROP_READINGSTRING | Stores reading data for a text range. This GUID specifies a custom property.

Properties can be associated with individual characters. For example, a text service can use properties to identify text ranges as belonging to specific languages.

The following illustration shows a text string obtained from two combined runs of Unicode text. For efficient access and editing, this text string is divided into several text ranges that consist of one or more characters. Properties have been associated with two of the ranges; one text range does not have any properties.


Properties in TSF Text Services and TSF-enabled Applications

Applications and TSF Text Services can access or modify properties using specific interfaces associated with the context. The context is an abstraction of the connection between the document manager and the document itself. This abstraction enables properties to be shared as well. Properties are generally public to applications and TSF Text Services; however, TSF Text Services can also register private and custom properties.

Applications use the ITfProperty interface to obtain property data. TSF Text Services use this interface to set or modify a property.

Properties are generally transparent to applications. It is more important for TSF Text Services to have access to property data because TSF Text Services generally create properties. However, applications do require data about properties that exist within a current context; for example, applications can save property data into a file alongside the document text. The ITfPropertyStore::Serialize method is used to serialize and download property data. This technique permits the restoration of property data when the file is opened again. Applications can also save language identification data with document text. Using this strategy saves time when the document is opened later because the document text will not require parsing to determine its language. The result is a gain in efficiency for grammar and spelling services.

Both applications and TSF Text Services use the IEnumTfProperties interface to enumerate the properties that exist within a context. This enables applications and TSF Text Services to locate and use the same properties. Use the ITfPropertyStore::GetType method to obtain a GUID that defines a custom property. TSF also supports methods to track multiple properties.


Property Types

TSF supports the following three property types.

  • Static Properties
  • Static Compact Properties
  • Custom Properties


Static Properties

Static properties not only specify the range of text to which the property will be applied, but also contain the data to which the property is applied. A static property is specified by a call to the ITfContext::GetProperty method using the PROPSTYLE_STATIC value.

The following figure shows text and its static properties.


Static Compact Properties

Static compact properties do not specify ranges for the text that they modify. They are effectively applied to entire ranges. They are most efficiently used to modify ranges that consist of single characters.

The following figure illustrates text and its static compact properties.


Custom Properties

Custom properties specify the range of text to which the property will be applied. Custom properties, designed mainly for TSF Text Services to use, are given only indirect access to the text that they modify. Instead, custom properties include a pointer to the ITfPropertyStore interface. TSF Text Services use this pointer to access and maintain the text data to which the property should be applied.

The following text illustrates text and some custom properties.

Custom properties are maintained by their owners. That is, the property owner maintains data about the range that the property modifies. TSF Text Services that create custom properties use the ITfPropertyStore interface.

Each time a custom property is attached to a text range, the TSF Text Service must provide an ITfPropertyStore interface pointer to TSF. The TSF Text Service causes the creation of a new instance of the property store to host the modified data.

The ITfPropertyStore::Shrink method is called after certain changes occur in a text range that is modified by a custom property. This method is called after a specified range has shrunk or moved. If an existing range was divided, TSF invokes the ITfPropertyStore::Divide method.


Technical Concepts

Text Services Framework (TSF) includes a variety of programmed text-handling features. Some of these features are supplied by input processors or text processors, application programming interfaces (APIs) that perform various text-handling tasks; for example, accepting input from alternative input devices that enable computer access to people with disabilites. Others are supplied by APIs called input methods. Input methods enhance the text input capabilities of computer users whose written languages are not easily expressed using the letters of the Latin alphabet.

The following topics describe some of the technical concepts you need to understand before you write an application that incorporates text services.

  • Character Encoding


Character Encoding

To develop multilingual applications, you should be familiar with EBCDIC, ASCII, ANSI, and Unicode. Unicode is the preferred encoding scheme in the Microsoft® Windows® 2000 and Microsoft® Windows NT® operating systems. Microsoft® Win32® operating systems are built on the use of both ANSI and Unicode. ANSI is only an 8-bit encoding scheme, however, and cannot support the 65,536 characters allocated by the Unicode 16-bit encoding scheme. While the EBCDIC and ASCII encoding schemes may soon become obsolete, you should be familiar with them in order to support legacy applications. Applications that employ double-byte character sets (DBCS) or multibyte character sets (MBCS), sometimes use ASCII for certain operations; wise use of ASCII in transmission and I/O operations can increase efficiency.

The Windows® 2000 and Windows NT® operating systems use Unicode as a native character set. Text Services Framework (TSF) is built on Unicode encoding; TSF text streams consist of Unicode characters, plain text that is easily handled and transported, but that can easily be marked up with text attributes. Multilingual applications that use Unicode can support the symbols used in writing systems around the world. Multilingual applications must also be able to perform conversions between Unicode and other applicable encoding schemes. This capability makes it possible to efficiently transmit and handle character streams.


Using Text Services Framework

This section consists of the following topics.

  • Usage Scenarios
  • Using the TSF Document Object Model
  • Accessing the Input Context
  • Using the Text Store
  • Enumerating Properties
  • Developing TSF-Enabled Applications


Usage Scenarios

Text Services Framework (TSF) is used in two ways. First, applications use TSF to support text services written as TSF Text Services, and second,TSF Text Services use TSF to provide a communication layer between themselves and applications.

TSF-Enabled Applications

A TSF-enabled application implements the ITextStoreACP or ITextStoreAnchor interface. These interfaces expose text through an edit buffer. ITextStoreACP is designed for applications with flat internal structures, such as Notepad. ITextStoreAnchor is designed for applications with hierarchical data structures, such as Microsoft Internet Explorer. The application shares text streams with TSF through these interfaces; that is, it is TSF-enabled. TSF-enabled applications can access all TSF Text Services installed on the host computer.

A TSF-enabled application communicates with TSF Text Services through a single point. A TSF-enabled application developer does not need to be concerned about internal differences between various TSF Text Service implementations, or communication between various TSF Text Services.

Text Input Processors

TSF Text Services are text services developed to implement the TSF architecture. TSF Text Services generate or modify text, typically performing some type of translation. TSF Text Services are handled in a device-independent manner, so they may use the keyboard, speech, a pen, or any other device, or no device, to generate text. TSF Text Services are written to communicate with the TSF architecture rather than communicate directly with applications.


Using the TSF Document Object Model

All document managers are accessed through the thread manager. All individual documents are accessed through a single document manager object. Editable text is accessed through an individual input context, and the input context is accessed through the document manager.


Accessing the Input Context

The ITfContext interface represents an individual input context and is accessed through the ITfDocumentMgr interface by using a call to ITfDocumentMgr::CreateContext. An input context represents a text stream. The input context is accessed through the ITfContext interface. All data about the state of the document that TSF maintains is available through ITfContext; this data is stored in the form of properties. Properties are accessed through ITfContext::GetProperty.

A default input context is associated with each document manager.


Using the Text Store

The text store interfaces enable an application to share text streams with Text Services Framework (TSF) Text Services. Clients may read or potentially modify document content through the text store interfaces. Applications must implement either the ITextStore or ITextStoreAnchor interface. If an object exposes both interfaces, TSF will use ITextStoreAnchor. If an application implements ITextStoreAnchor, it must also implement IAnchor.

The text store encapsulates the TSF text stream. Text store interfaces create the text store from ranges structured by and manipulated using delimiters called anchors, or by Application Character Position (ACP). The context abstracts the connection between the document manager and the text store, so TSF clients can fully access the document buffer, wherever it is hosted. Text is dynamic because the entire buffer is available to the TSF Text Service and the application. And, instead of being discarded in the conversion process, the input source can be made persistent. That is, it can be stored and later retrieved for comparison, conversion, or reconversion. The accumulation of data that persists in the document buffer creates a powerful conversion context for more accurate text conversion.

Application developers may implement the input context's edit buffer. If application developers do not implement an edit buffer, TSF will supply a default implementation that applications access through the thread manager. Typically, an application will implement its own edit buffer for greater flexibility.


Enumerating Properties

Properties are accessed through a call to ITfContext::GetProperty which returns a reference to the ITfProperty interface. To use this interface you must know the globally unique identifier (GUID) that identifies the property. Text Services Framework (TSF) has predefined property GUIDs, and applications or TSF Text Services can register private properties using unique GUIDs.

An application can access all properties by enumerating them with the IEnumTfProperties interface accessed through a call to ITfContext::EnumProperties. The following example shows what the code may look like:

ITfEnumProperties *pEnumProp;

if (SUCCEEDED(pInputContext->EnumProperties(&pEnumProp)))
{
    ITfProperty *pProp;
    while (pEnumProp->Next(1, &pProp, NULL) == S_OK)
    {
        // Do something with pProp.
        pProp->Release();
    }
    pEnumProp->Release();
}


Developing TSF-Enabled Applications

The following topics discuss Text Services Framework (TSF)-enabled applications:

  • TSF Application Development Models
  • TSF Application Step by Step


TSF Application Development Models

TSF-enabled applications are developed using either an ACP-based model, or an anchor-based model.

ACP-Based Document Model

In an ACP-based development model, text stores are exposed using a character offset, or Application Character Position (ACP)-based format. This model is for applications with a flat internal structure, such as Notepad. Applications that use the ACP model will implement the ITextStoreACP interface.

Anchor-Based Document Model

In an anchor-based development model, a text store is exposed through an anchor. This model is for applications with a hierarchical internal structure, such as Internet Explorer. Applications that use the anchor model will implement the ITextStoreAnchor interface.


TSF Application Step by Step

The following steps are required to develop a TSF-enabled application.

  • Initialize the Interfaces
  • Create the Communication Structure
  • Set the Window Focus


Initialize the Interfaces

The first step in a TSF-enabled application is to initialize the TSF interfaces. This is done with a call to CoCreateInstance that activates the thread manager. The application can then access other interfaces through ITfThreadMgr.

The following example shows what the call may look like:

hr = CoCreateInstance(CLSID_TF_ThreadMgr, NULL, CLSCTX_INPROC_SERVER, IID_ITfThreadMgr, (void**)&g_tim);

If this call is successful, the thread manager is initialized. Next, Create the Communication Structure.


Create the Communication Structure

After creating the thread manager, a TSF-enabled application should create a document manager.

The following example shows what the call may look like:

if (FAILED(g_tim->CreateDocumentMgr(&_dim)))
  goto ExitError;

If this call is successful, the document manager is created, as well as access to the input context. Next, the application should Set the Window Focus.


Set the Window Focus

After creating the document manager, a TSF-enabled application should set the window focus with a call to ITfThreadMgr::SetFocus. This call associates the window focus with the current document object. From this step forward the application is ready to run.


Text Services Framework Reference

This section describes the reference elements for the Microsoft® Windows® Text Services Framework. These elements include the following:

  • Constants
  • Return Values
  • Data Types
  • Interfaces
  • Enumerations
  • Structures


Text Services Framework Constants

This section presents topics about the following constants.

  • TSF Text Service Constants
  • Language Bar Constants
  • Framework Constants
  • Text Store Constants


TSF Text Service Constants

The TSF Text Service constants consist of the following categories.

  • Miscellaneous TSF Text Service Constants
  • Speech Recognition Constants


Miscellaneous TSF Text Service Constants

TBD

#define TF_MENUREADY                 0x00000001

#define TF_PROPUI_STATUS_SAVETOFILE  0x00000001

#define TF_SHOW_BALLOON              0x00000001

#define TF_DISABLE_BALLOON           0x00000002

Constants

TF_MENUREADY
TBD
TF_PROPUI_STATUS_SAVETOFILE
For ITfFnPropertyUIStatus.
TF_SHOW_BALLOON
TBD
TF_DISABLE_BALLOON
TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


Speech Recognition Constants

TBD

#define TF_DICTATION_ON        0x00000001
#define TF_DICTATION_ENABLED   0x00000002
#define TF_COMMANDING_ENABLED  0x00000004
#define TF_COMMANDING_ON       0x00000008

Constants

TF_DICTATION_ON
TBD
TF_DICTATION_ENABLED
TBD
TF_COMMANDING_ENABLED
TBD
TF_COMMANDING_ON
TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


Language Bar Constants

The language bar constants consist of the following categories.

  • Miscellaneous Language Bar Constants
  • TF_FLOATINGLANGBAR_* Constants
  • TF_LBESF_* Constants
  • TF_LBI_* Constants
  • TF_LBI_STATUS_* Constants
  • TF_LBI_STYLE_* Constants
  • TF_LBMENUF_* Constants
  • TF_SFT_* Constants


Miscellaneous Language Bar Constants

The miscellaneous language bar constants set various properties of language bars.

#define TF_DTLBI_USEPROFILEICON       0x00000001

#define TF_INVALIDMENUITEM            (UINT)(-1)

#define TF_LBSMI_FILTERCURRENTTHREAD  ( 0x1 )

Constants

TF_DTLBI_USEPROFILEICON
Use the profile icon instead of the default icon for a button. Used in the ITfSystemDeviceTypeLangBarItem::GetIconMode and ITfSystemDeviceTypeLangBarItem::SetIconMode methods.
TF_INVALIDMENUITEM
Passed to the ITfSystemLangBarItemSink::OnMenuSelect method when a menu is canceled.
TF_LBSMI_FILTERCURRENTTHREAD
Filter the current thread with modal input notification. Used in the ITfLangBarMgr::SetModalInput method.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.

See Also

ITfLangBarMgr::SetModalInput, ITfSystemDeviceTypeLangBarItem::GetIconMode, ITfSystemDeviceTypeLangBarItem::SetIconMode, ITfSystemLangBarItemSink::OnMenuSelect


TF_FLOATINGLANGBAR_* Constants

The TF_FLOATINGLANGBAR_* constants define a string for the title of the language bar window.

#define TF_FLOATINGLANGBAR_WNDTITLEW  L"TF_FloatingLangBar_WndTitle"
#define TF_FLOATINGLANGBAR_WNDTITLEA  "TF_FloatingLangBar_WndTitle"
#ifdef UNICODE
  #define TF_FLOATINGLANGBAR_WNDTITLE   TF_FLOATINGLANGBAR_WNDTITLEW
#else
  #define TF_FLOATINGLANGBAR_WNDTITLE   TF_FLOATINGLANGBAR_WNDTITLEA
#endif

Constants

TF_FLOATINGLANGBAR_WNDTITLEW
The string of UNICODE characters L"TF_FloatingLangBar_WndTitle" for the title.
TF_FLOATINGLANGBAR_WNDTITLEA
The string of ANSI characters "TF_FloatingLangBar_WndTitle" for the title.
TF_FLOATINGLANGBAR_WNDTITLE
If UNICODE is defined, takes the value of the TF_FLOATINGLANGBAR_WNDTITLEW constant. Otherwise, takes the value of the TF_FLOATINGLANGBAR_WNDTITLEA constant.

Remarks

Although there are three constants in this group, the primary one is TF_FLOATINGLANGBAR_WNDTITLE, which takes either the ANSI or UNICODE value, as appropriate.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


TF_LBESF_* Constants

The TF_LBESF_* constants describe language bar manager event sinks.

#define TF_LBESF_GLOBAL               ( 0x1 )
#define TF_LBESF_FLOATING             ( 0x2 )

Constants

TF_LBESF_GLOBAL
The event sink is global so that it receives notifications outside of its thread and process.
TF_LBESF_FLOATING
The event sink supports a floating toolbar.

Remarks

The dwFlags parameter of the ITfLangBarMgr::AdviseEventSink method uses these constants.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.

See Also

ITfLangBarMgr::AdviseEventSink


TF_LBI_* Constants

The TF_LBI_* constants indicate which elements of a language bar button have changed.

#define TF_LBI_ICON           0x00000001
#define TF_LBI_TEXT           0x00000002
#define TF_LBI_TOOLTIP        0x00000004
#define TF_LBI_BITMAP         0x00000008
#define TF_LBI_BTNALL         0x00000007
#define TF_LBI_BMPBTNALL      0x0000000b
#define TF_LBI_BMPALL         0x0000000c
#define TF_LBI_BALLOON        0x00000010
#define TF_LBI_STATUS         0x00010000

#define TF_LBI_BMPF_VERTICAL  0x00000001

Constants

TF_LBI_ICON
The icon of the button has changed.
TF_LBI_TEXT
The text of the button has changed.
TF_LBI_TOOLTIP
The tooltip string of the button has changed.
TF_LBI_BITMAP
The bitmap of the button has changed.
TF_LBI_BTNALL
The icon, text, and tooltip string of the button have changed.
TF_LBI_BMPBTNALL
The bitmap, text, and tooltip string of the button have changed.
TF_LBI_BMPALL
The tooltip string and the bitmap of the button have changed.
TF_LBI_BALLOON
The balloon information of the button has changed.
TF_LBI_STATUS
The status of the button has changed.
TF_LBI_BMPF_VERTICAL
TBD

Remarks

The ITfLangBarItemSink::OnUpdate method returns the result of a logical OR operation of one or more of these constants to indicate what has changed for a language bar button.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.

See Also

ITfLangBarItemSink::OnUpdate


TF_LBI_STATUS_* Constants

The TF_LBI_STATUS_* constants indicates the status of a language bar item.

#define TF_LBI_STATUS_HIDDEN       0x00000001
#define TF_LBI_STATUS_DISABLED     0x00000002
#define TF_LBI_STATUS_BTN_TOGGLED  0x00010000

Constants

TF_LBI_STATUS_HIDDEN
The item is hidden. The item can be hidden when the style of the item does not include the TF_LBI_STYLE_HIDDENSTATUSCONTROL constant.
TF_LBI_STATUS_DISABLED
The item is disabled.
TF_LBI_STATUS_BTN_TOGGLED
The item was toggled. Valid only for items with styles that include the TF_LBI_STYLE_BTN_TOGGLE constant.

Remarks

The ITfLangBarItem::GetStatus method returns the result of a logical OR operation of one or more of these constants to indicate the status of the language bar item.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.

See Also

ITfLangBarItem::GetStatus


TF_LBI_STYLE_* Constants

The TF_LBI_STYLE_* constants indicate the style of a language bar item.

#define TF_LBI_STYLE_HIDDENSTATUSCONTROL  0x00000001
#define TF_LBI_STYLE_SHOWNINTRAY          0x00000002
#define TF_LBI_STYLE_HIDEONNOOTHERITEMS   0x00000004
#define TF_LBI_STYLE_SHOWNINTRAYONLY      0x00000008
#define TF_LBI_STYLE_HIDDENBYDEFAULT      0x00000010
#define TF_LBI_STYLE_BTN_BUTTON           0x00010000
#define TF_LBI_STYLE_BTN_MENU             0x00020000
#define TF_LBI_STYLE_BTN_TOGGLE           0x00040000

Constants

TF_LBI_STYLE_HIDDENSTATUSCONTROL
The item is not hidden by Intellisense, or there isn't anything to hide. The TF_LBI_STATUS_HIDDEN constant can be used to show or hide the button.
TF_LBI_STYLE_SHOWNINTRAY
The item is shown in the tray when the language bar is minimized.
TF_LBI_STYLE_HIDEONNOOTHERITEMS
The language bar is hidden only if it contains buttons of this style.
TF_LBI_STYLE_SHOWNINTRAYONLY
The language bar is hidden on the floating toolbar but is shown on the tray.
TF_LBI_STYLE_HIDDENBYDEFAULT
The item is shown in the toolbar only if it is added from the user interface.
TF_LBI_STYLE_BTN_BUTTON
The item is a push button.
TF_LBI_STYLE_BTN_MENU
The item is a menu button.
TF_LBI_STYLE_BTN_TOGGLE
The item is a toggle button.

Remarks

The ITfLangBarItem::GetInfo method returns the result of a logical OR operation of one or more of these constants to indicate the style of the language bar item.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.

See Also

ITfLangBarItem::GetInfo


TF_LBMENUF_* Constants

The TF_LBMENUF_* constants specify the characteristics of a menu item in a language bar.

#define TF_LBMENUF_CHECKED       ( 0x1 )
#define TF_LBMENUF_SUBMENU       ( 0x2 )
#define TF_LBMENUF_SEPARATOR     ( 0x4 )
#define TF_LBMENUF_RADIOCHECKED  ( 0x8 )
#define TF_LBMENUF_GRAYED        ( 0x10 )

Constants

TF_LBMENUF_CHECKED
The menu item is checked.
TF_LBMENUF_SUBMENU
The menu item has a submenu.
TF_LBMENUF_SEPARATOR
The menu item is a separator.
TF_LBMENUF_RADIOCHECKED
The menu item is a radio check mark.
TF_LBMENUF_GRAYED
The menu item is disabled.

Remarks

The dwFlags parameter of the ITfMenu::AddMenuItem method uses these constants.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.

See Also

ITfMenu::AddMenuItem


TF_SFT_* Constants

The TF_SFT_* constants specify attributes of a floating language bar.

#define TF_SFT_SHOWNORMAL               0x00000001
#define TF_SFT_DOCK                     0x00000002
#define TF_SFT_MINIMIZED                0x00000004
#define TF_SFT_HIDDEN                   0x00000008
#define TF_SFT_NOTRANSPARENCY           0x00000010
#define TF_SFT_LOWTRANSPARENCY          0x00000020
#define TF_SFT_HIGHTRANSPARENCY         0x00000040
#define TF_SFT_LABELS                   0x00000080
#define TF_SFT_NOLABELS                 0x00000100
#define TF_SFT_EXTRAICONSONMINIMIZED    0x00000200
#define TF_SFT_NOEXTRAICONSONMINIMIZED  0x00000400

Constants

TF_SFT_SHOWNORMAL
Set the language bar to normal. This constant cannot be combined with the TF_SFT_DOCK, TF_SFT_MINIMIZED, or TF_SFT_HIDDEN constants.
TF_SFT_DOCK
Not yet implemented.
TF_SFT_MINIMIZED
Set the language bar to minimized. This constant cannot be combined with the TF_SFT_SHOWNORMAL, TF_SFT_DOCK, or TF_SFT_HIDDEN constants.
TF_SFT_HIDDEN
Set the language bar to hidden. This constant cannot be combined with the TF_SFT_SHOWNORMAL, TF_SFT_DOCK, or TF_SFT_MINIMIZED constants.
TF_SFT_NOTRANSPARENCY
Set the language bar to be opaque.
TF_SFT_LOWTRANSPARENCY
Set the language bar to be partially transparent.
TF_SFT_HIGHTRANSPARENCY
Set the language bar to be highly transparent.
TF_SFT_LABELS
Set the language bar to show text labels.
TF_SFT_NOLABELS
Set the language bar to hide text labels.
TF_SFT_EXTRAICONSONMINIMIZED
Set the language bar to show extra icons when minimized.
TF_SFT_NOEXTRAICONSONMINIMIZED
Set the language bar to hide extra icons when minimized.

Remarks

The ITfLangBarMgr::ShowFloating method sets the result of a logical OR operation of one or more of these constants to specify the attributes of the language bar item.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.

See Also

ITfLangBarMgr::ShowFloating


Framework Constants

The framework constants consist of the following categories.

  • Miscellaneous Framework Constants
  • TF_* Constants
  • TF_DISABLE_* Constants
  • TF_ES_* Constants
  • TF_IAS_* Constants
  • TF_MOD_* Constants
  • TF_SD_* Constants
  • TF_SS_* Constants
  • TF_TF_* Constants


Miscellaneous Framework Constants

TBD

#define TF_CLIENTID_NULL        ((TfClientId)0)
#define TF_INVALID_GUIDATOM     ((TfGuidAtom)0)

#define TF_CHAR_EMBEDDED        ( TS_CHAR_EMBEDDED )

#define TF_DEFAULT_SELECTION    ( TS_DEFAULT_SELECTION )

#define TF_GTP_INCL_TEXT        ( 0x1 )

#define TF_HF_OBJECT            ( 1 )

#define TF_IE_CORRECTION        ( 1 )

#define TF_INVALID_COOKIE       ( 0xffffffff )

#define TF_INVALID_EDIT_COOKIE  ( 0 )

#define TF_POPF_ALL             ( 0x1 )

#define TF_ST_CORRECTION        ( 1 )

#define TF_TU_CORRECTION        ( 0x1 )

#define TF_US_HIDETIPUI         0x00000001

Constants

TF_CLIENTID_NULL
TBD
TF_INVALID_GUIDATOM
TBD
TF_CHAR_EMBEDDED
The character is a Unicode 2.1 object-replacement character.
TF_DEFAULT_SELECTION
TBD
TF_GTP_INCL_TEXT
TBD
TF_HF_OBJECT
Halt the ship for TF_CHAR_EMBEDDED.
TF_IE_CORRECTION
The text is a transform (correction) of existing content.
TF_INVALID_COOKIE
TBD
TF_INVALID_EDIT_COOKIE
TBD
TF_POPF_ALL
TBD
TF_ST_CORRECTION
The text is a transform (correction) of existing content.
TF_TU_CORRECTION
The text is a transform (correction) of existing content.
TF_US_HIDETIPUI
TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


TF_* Constants

TBD

#define TF_PROCESS_ATOM         TEXT("_CTF_PROCESS_ATOM_")
#define TF_ENABLE_PROCESS_ATOM  TEXT("_CTF_ENABLE_PROCESS_ATOM_")

Constants

TF_PROCESS_ATOM
TBD
TF_ENABLE_PROCESS_ATOM
TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


TF_DISABLE_* Constants

TBD

#define TF_DISABLE_SPEECH      0x00000001
#define TF_DISABLE_DICTATION   0x00000002
#define TF_DISABLE_COMMANDING  0x00000004

Constants

TF_DISABLE_SPEECH
TBD
TF_DISABLE_DICTATION
TBD
TF_DISABLE_COMMANDING
TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


TF_ES_* Constants

TBD

#define TF_ES_ASYNCDONTCARE  ( 0 )
#define TF_ES_SYNC           ( 0x1 )
#define TF_ES_READ           ( 0x2 )
#define TF_ES_READWRITE      ( 0x6 )
#define TF_ES_ASYNC          ( 0x8 )

Constants

TF_ES_ASYNCDONTCARE
TBD
TF_ES_SYNC
TBD
TF_ES_READ
TBD
TF_ES_READWRITE
TBD
TF_ES_ASYNC
TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


TF_IAS_* Constants

TBD (Used with the InsertTextAtSelection methods.)

#define TF_IAS_NOQUERY                 ( 0x1 )
#define TF_IAS_QUERYONLY               ( 0x2 )
#define TF_IAS_NO_DEFAULT_COMPOSITION  ( 0x80000000 )

Constants

TF_IAS_NOQUERY
ppRange will be NULL at exit.
TF_IAS_QUERYONLY
Don't do the actual insert; caller only interested in ppRange.
TF_IAS_NO_DEFAULT_COMPOSITION
Caller takes responsibility for starting a composition over the range.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


TF_MOD_* Constants

TBD

#define TF_MOD_ALT                  0x0001
#define TF_MOD_CONTROL              0x0002
#define TF_MOD_SHIFT                0x0004
#define TF_MOD_RALT                 0x0008
#define TF_MOD_RCONTROL             0x0010
#define TF_MOD_RSHIFT               0x0020
#define TF_MOD_LALT                 0x0040
#define TF_MOD_LCONTROL             0x0080
#define TF_MOD_LSHIFT               0x0100
#define TF_MOD_ON_KEYUP             0x0200
#define TF_MOD_IGNORE_ALL_MODIFIER  0x0400

Constants

TF_MOD_ALT
TBD
TF_MOD_CONTROL
TBD
TF_MOD_SHIFT
TBD
TF_MOD_RALT
TBD
TF_MOD_RCONTROL
TBD
TF_MOD_RSHIFT
TBD
TF_MOD_LALT
TBD
TF_MOD_LCONTROL
TBD
TF_MOD_LSHIFT
TBD
TF_MOD_ON_KEYUP
TBD
TF_MOD_IGNORE_ALL_MODIFIER
TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


TF_SD_* Constants

The TF_SD_* constants describe dynamic document states.

#define TF_SD_READONLY     ( TS_SD_READONLY )
#define TF_SD_LOADING      ( TS_SD_LOADING )

Constants

TF_SD_READONLY
The document is read-only.
TF_SD_LOADING
The document is loading and may be incomplete.

Remarks

The dwDynamicFlags member of the TF_STATUS structure uses these constants.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.

See Also

TS_SD_* Constants, TF_STATUS


TF_SS_* Constants

The TF_SS_* constants describe static document states.

#define TF_SS_DISJOINTSEL  ( TS_SS_DISJOINTSEL )
#define TF_SS_REGIONS      ( TS_SS_REGIONS )
#define TF_SS_TRANSITORY   ( TS_SS_TRANSITORY )

Constants

TF_SS_DISJOINTSEL
The document supports multiple selections.
TF_SS_REGIONS
The document does not contain multiple regions.
TF_SS_TRANSITORY
The document is expected to have a short lifetime.

Remarks

The dwStaticFlags member of the TF_STATUS structure uses these constants.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.

See Also

TS_ST_* Constants, TF_STATUS


TF_TF_* Constants

TBD

#define TF_TF_MOVESTART  ( 1 )
#define TF_TF_IGNOREEND  ( 2 )

Constants

TF_TF_MOVESTART
Update start anchor.
TF_TF_IGNOREEND
Ignore end anchor.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


Text Store Constants

The text store constants consist of the following categories.

  • GXFPF_* Constants
  • Miscellaneous Text Store Constants
  • TS_AS_* Constants
  • TS_ATTR_* Constants
  • TS_CH_* Constants
  • TS_CHAR_* Constants
  • TS_IAS_* Constants
  • TS_IE_* Constants
  • TS_LF_* Constants
  • TS_SD_* Constants
  • TS_SHIFT_* Constants
  • TS_SS_* Constants
  • TS_ST_* Constants


GXFPF_* Constants

The GXFPF_* constants specify how to handle rounding when converting screen coordinates to character offsets.

#define GXFPF_ROUND_NEAREST  ( 0x1 )
#define GXFPF_NEAREST        ( 0x2 )

Constants

GXFPF_ROUND_NEAREST
Round the screen coordinate down to the nearest character offset.
GXFPF_NEAREST
If the screen coordinate does not include any character, set to the nearest character offset.

Remarks

The dwflags parameters of the ITextStoreACP::GetACPFromPoint and ITfContextOwner::GetACPFromPoint methods use these constants.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.

See Also

ITextStoreACP::GetACPFromPoint, ITfContextOwner::GetACPFromPoint


Miscellaneous Text Store Constants

TBD

#define TS_DEFAULT_SELECTION  ( ( ULONG  )-1 )

#define TS_GEA_HIDDEN         ( 0x1 )

#define TS_GTA_HIDDEN         ( 0x1 )

#define TS_TC_CORRECTION      ( 0x1 )

#define TS_VCOOKIE_NUL        ( 0xffffffff )

Constants

TS_DEFAULT_SELECTION
TBD
TS_GEA_HIDDEN
Return hidden text in GetEmbedded methods.
TS_GTA_HIDDEN
Return hidden text in GetText methods.
TS_TC_CORRECTION
The text is a transform (correction) of existing content.
TS_VCOOKIE_NUL
TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


TS_AS_* Constants

TBD (The TS_AS_* constants are used as flags in the AdviseSink methods.)

#define TS_AS_TEXT_CHANGE    ( 0x1 )
#define TS_AS_SEL_CHANGE     ( 0x2 )
#define TS_AS_LAYOUT_CHANGE  ( 0x4 )
#define TS_AS_ATTR_CHANGE    ( 0x8 )
#define TS_AS_STATUS_CHANGE  ( 0x10 )
#define TS_AS_ALL_SINKS      ( TS_AS_TEXT_CHANGE | TS_AS_SEL_CHANGE | TS_AS_LAYOUT_CHANGE | TS_AS_ATTR_CHANGE | TS_AS_STATUS_CHANGE )

Constants

TS_AS_TEXT_CHANGE
Use the sink's OnTextChange method.
TS_AS_SEL_CHANGE
Use the sink's OnSelectionChange method.
TS_AS_LAYOUT_CHANGE
Use the sink's OnLayoutChange method.
TS_AS_ATTR_CHANGE
Use the sink's OnAttrChange method.
TS_AS_STATUS_CHANGE
Use the sink's OnStatusChange method.
TS_AS_ALL_SINKS
Use all of the sink's OnTextChange, OnSelectionChange, OnLayoutChange, OnAttrChange, and OnStatusChange methods.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


TS_ATTR_* Constants

TBD

#define TS_ATTR_FIND_BACKWARDS    ( 0x1 )
#define TS_ATTR_FIND_WANT_OFFSET  ( 0x2 )
#define TS_ATTR_FIND_UPDATESTART  ( 0x4 )
#define TS_ATTR_FIND_WANT_VALUE   ( 0x8 )
#define TS_ATTR_FIND_WANT_END     ( 0x10 )
#define TS_ATTR_FIND_HIDDEN       ( 0x20 )

Constants

TS_ATTR_FIND_BACKWARDS
TBD
TS_ATTR_FIND_WANT_OFFSET
TBD
TS_ATTR_FIND_UPDATESTART
TBD
TS_ATTR_FIND_WANT_VALUE
TBD
TS_ATTR_FIND_WANT_END
TBD
TS_ATTR_FIND_HIDDEN
TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


TS_CH_* Constants

TBD

#define TS_CH_PRECEDING_DEL  ( 1 )
#define TS_CH_FOLLOWING_DEL  ( 2 )

Constants

TS_CH_PRECEDING_DEL
TBD
TS_CH_FOLLOWING_DEL
TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


TS_CHAR_* Constants

The TS_CHAR_* constants describe the type of character.

#define TS_CHAR_EMBEDDED     ( 0xfffc )
#define TS_CHAR_REGION       ( 0 )
#define TS_CHAR_REPLACEMENT  ( 0xfffd )

Constants

TS_CHAR_EMBEDDED
The character is a Unicode 2.1 object-replacement character.
TS_CHAR_REGION
The character is a region boundary.
TS_CHAR_REPLACEMENT
The character is a hidden-text placeholder character or a Unicode replacement character.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


TS_IAS_* Constants

TBD (Used with the InsertTextAtSelection methods.)

#define TS_IAS_NOQUERY    ( 0x1 )
#define TS_IAS_QUERYONLY  ( 0x2 )

Constants

TS_IAS_NOQUERY
ppRange will be NULL at exit.
TS_IAS_QUERYONLY
Don't do the actual insert; caller only interested in ppRange.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


TS_IE_* Constants

The TS_IE_* constants describe how to insert text.

#define TS_IE_CORRECTION   ( 0x1 )
#define TS_IE_COMPOSITION  ( 0x2 )

Constants

TS_IE_CORRECTION
The text is a transform (correction) of existing content.
TS_IE_COMPOSITION
The text is a new composition.

Remarks

The dwFlags parameters of the ITextStoreACP::InsertEmbedded, ITextStoreAnchor::InsertEmbedded, and ITfRange::InsertEmbedded methods use these constants.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.

See Also

ITextStoreACP::InsertEmbedded, ITextStoreAnchor::InsertEmbedded, ITfRange::InsertEmbedded


TS_LF_* Constants

The TS_LF_* constants specify the type of request lock to make.

#define TS_LF_SYNC       ( 0x1 )
#define TS_LF_READ       ( 0x2 )
#define TS_LF_READWRITE  ( 0x6 )

Constants

TS_LF_SYNC
Use a synchronous lock.
TS_LF_READ
Use a read-only lock.
TS_LF_READWRITE
Use a read-write lock.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.

See Also

ITextStoreACP::RequestLock, ITextStoreAnchor::RequestLock


TS_SD_* Constants

The TS_SD_* constants describe dynamic document states.

#define TS_SD_READONLY  ( 0x1 )
#define TS_SD_LOADING   ( 0x2 )
#define TS_SD_MASKALL   ( TS_SD_READONLY | TS_SD_LOADING )

Constants

TS_SD_READONLY
The document is read-only.
TS_SD_LOADING
The document is loading and may be incomplete.
TS_SD_MASKALL
The document is both read-only and loading.

Remarks

The dwDynamicFlags member of the TS_STATUS structure uses these constants.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.

See Also

TS_STATUS


TS_SHIFT_* Constants

TBD

#define TS_SHIFT_COUNT_HIDDEN  ( 0x1 )
#define TS_SHIFT_HALT_HIDDEN   ( 0x2 )
#define TS_SHIFT_HALT_VISIBLE  ( 0x4 )
#define TS_SHIFT_COUNT_ONLY    ( 0x8 )

Constants

TS_SHIFT_COUNT_HIDDEN
TBD
TS_SHIFT_HALT_HIDDEN
TBD
TS_SHIFT_HALT_VISIBLE
TBD
TS_SHIFT_COUNT_ONLY
TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


TS_SS_* Constants

The TS_SS_* constants describe static document states.

#define TS_SS_DISJOINTSEL   ( 0x1 )
#define TS_SS_REGIONS       ( 0x2 )
#define TS_SS_TRANSITORY    ( 0x4 )
#define TS_SS_NOHIDDENTEXT  ( 0x8 )

Constants

TS_SS_DISJOINTSEL
The document supports multiple selections.
TS_SS_REGIONS
The document does not contain multiple regions.
TS_SS_TRANSITORY
The document is expected to have a short lifetime.
TS_SS_NOHIDDENTEXT
The document does not contain hidden text.

Remarks

The dwStaticFlags member of the TS_STATUS structure uses these constants.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.

See Also

TS_STATUS


TS_ST_* Constants

The TS_ST_* constants describe how to replace text.

#define TS_ST_CORRECTION   ( 0x1 )
#define TS_ST_COMPOSITION  ( 0x2 )

Constants

TS_ST_CORRECTION
The text is a transform (correction) of existing content.
TS_ST_COMPOSITION
The text is a new composition.

Remarks

The dwFlags parameters of the ITextStoreACP::SetText, ITextStoreAnchor::SetText, and ITfRange::SetText methods use these constants.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.

See Also

ITextStoreACP::SetText, ITextStoreAnchor::SetText, ITfRange::SetText


Text Services Framework Return Values

Interface methods of the Text Services Framework produce return values in the range from 0xHHHH0200 to 0xHHHH0600, where HHHH is a hexadecimal value that depends on the severity code and facility code of a specific return value.

The return values group into the following categories.

  • TSF Text Service Values
  • Framework Values
  • Text Store Values


TSF Text Service Values

A TSF Text Service produces a return value of 0xHHHH0600. The following table gives the TSF Text Service return value.

Value | Description
TF_E_NOCONVERSION 0x80040600 | No conversion is available for the selected range of text.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.
Library: Included as a resource in Msctf.dll.


Framework Values

The Text Services Framework produces return values in the range from 0xHHHH0200 to 0xHHHH0507. The following table gives the framework return values in alphabetical order.

Value | Description
TF_E_ALREADY_EXISTS 0x80040506 | TBD
TF_E_COMPOSITION_REJECTED 0x80040508 | TBD
TF_E_DISCONNECTED 0x80040504 | TBD
TF_E_EMPTYCONTEXT 0x8004020a | TBD
TF_E_FORMAT 0x8004020a | TBD
TF_E_INVALIDPOINT 0x80040207 | TBD
TF_E_INVALIDPOS 0x80040200 | TBD
TF_E_INVALIDVIEW 0x80040505 | TBD
TF_E_LOCKED 0x80040500 | TBD
TF_E_NOINTERFACE 0x80040204 | TBD
TF_E_NOLAYOUT 0x80040206 | TBD
TF_E_NOLOCK 0x80040201 | TBD
TF_E_NOOBJECT 0x80040202 | TBD
TF_E_NOPROVIDER 0x80040503 | TBD
TF_E_NOSELECTION 0x80040205 | TBD
TF_E_NOSERVICE 0x80040203 | TBD
TF_E_NOTOWNEDRANGE 0x80040502 | TBD
TF_E_RANGE_NOT_COVERED 0x80040507 | TBD
TF_E_READONLY 0x80040209 | TBD
TF_E_STACKFULL 0x80040501 | TBD
TF_E_SYNCHRONOUS 0x80040208 | TBD
TF_S_ASYNC 0x00040300 | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


Text Store Values

When a document manager processes a text store, it produces return values in the range from 0xHHHH0200 to 0xHHHH0300. The following table gives the text store return values in alphabetical order.

Value | Description
TS_E_FORMAT 0x8004020a | TBD
TS_E_INVALIDPOINT 0x80040207 | TBD
TS_E_INVALIDPOS 0x80040200 | TBD
TS_E_NOINTERFACE 0x80040204 | TBD
TS_E_NOLAYOUT 0x80040206 | TBD
TS_E_NOLOCK 0x80040201 | TBD
TS_E_NOOBJECT 0x80040202 | TBD
TS_E_NOSELECTION 0x80040205 | TBD
TS_E_NOSERVICE 0x80040203 | TBD
TS_E_READONLY 0x80040209 | TBD
TS_E_SYNCHRONOUS 0x80040208 | TBD
TS_S_ASYNC 0x00040300 | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


Text Services Framework Data Types

The Text Services Framework includes the following data types.

  • HKL
  • TF_STATUS
  • TfClientId
  • TfEditCookie
  • TfGuidAtom
  • TS_ATTRID
  • TsViewCookie


HKL

TBD

typedef UINT_PTR HKL;

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


TF_STATUS

TBD

typedef TS_STATUS TF_STATUS

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

TS_STATUS


TfClientId

Value for each text service and application in the process.

typedef DWORD TfClientId;

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


TfEditCookie

Cookie value to identify the EditSession.

typedef DWORD TfEditCookie;

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


TfGuidAtom

Atom value to identify the GUID. This value is valid in the process.

typedef DWORD TfGuidAtom;

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


TS_ATTRID

Application identifier attribute

typedef GUID TS_ATTRID;

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


TsViewCookie

TBD

typedef DWORD TsViewCookie;

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


Text Services Framework Interfaces

These are the Text Services Framework interfaces:

  • IAnchor
  • IEnumITfCompositionView
  • IEnumTfCandidates
  • IEnumTfContexts
  • IEnumTfContextViews
  • IEnumTfDisplayAttributeInfo
  • IEnumTfDocumentMgrs
  • IEnumTfFunctionProviders
  • IEnumTfLangBarItems
  • IEnumTfLanguageProfiles
  • IEnumTfLatticeElements
  • IEnumTfProperties
  • IEnumTfPropertyValue
  • IEnumTfRanges
  • ITextStoreACP
  • ITextStoreACPServices
  • ITextStoreACPSink
  • ITextStoreAnchor
  • ITextStoreAnchorServices
  • ITextStoreAnchorSink
  • ITfActiveLanguageProfileNotifySink
  • ITfCandidateList
  • ITfCandidateString
  • ITfCategoryMgr
  • ITfCleanupContextDurationSink
  • ITfCleanupContextSink
  • ITfClientId
  • ITfCompartment
  • ITfCompartmentEventSink
  • ITfCompartmentMgr
  • ITfComposition
  • ITfCompositionSink
  • ITfCompositionView
  • ITfConfigureSystemKeystrokeFeed
  • ITfContext
  • ITfContextComposition
  • ITfContextKeyEventSink
  • ITfContextOwner
  • ITfContextOwnerCompositionServices
  • ITfContextOwnerCompositionSink
  • ITfContextOwnerServices
  • ITfContextView
  • ITfCreatePropertyStore
  • ITfDisplayAttributeInfo
  • ITfDisplayAttributeMgr
  • ITfDisplayAttributeNotifySink
  • ITfDisplayAttributeProvider
  • ITfDocumentMgr
  • ITfEditRecord
  • ITfEditSession
  • ITfEditTransactionSink
  • ITfFnAbort
  • ITfFnAdviseText
  • ITfFnBalloon
  • ITfFnConfigure
  • ITfFnConfigureRegisterWord
  • ITfFnGetSAPIObject
  • ITfFnLangProfileUtil
  • ITfFnLMInternal
  • ITfFnLMProcessor
  • ITfFnPlayBack
  • ITfFnPropertyUIStatus
  • ITfFnReconversion
  • ITfFnShowHelp
  • ITfFunction
  • ITfFunctionProvider
  • ITfInputProcessorProfiles
  • ITfInsertAtSelection
  • ITfKeyEventSink
  • ITfKeystrokeMgr
  • ITfKeyTraceEventSink
  • ITfLangBarEventSink
  • ITfLangBarItem
  • ITfLangBarItemBalloon
  • ITfLangBarItemBitmap
  • ITfLangBarItemBitmapButton
  • ITfLangBarItemButton
  • ITfLangBarItemMgr
  • ITfLangBarItemSink
  • ITfLangBarMgr
  • ITfLanguageProfileNotifySink
  • ITfLMLattice
  • ITfMenu
  • ITfMessagePump
  • ITfMouseSink
  • ITfMouseTracker
  • ITfMouseTrackerACP
  • ITfMouseTrackerAnchor
  • ITfPersistentPropertyLoaderACP
  • ITfPersistentPropertyLoaderAnchor
  • ITfPreservedKeyNotifySink
  • ITfProperty
  • ITfPropertyStore
  • ITfQueryEmbedded
  • ITfRange
  • ITfRangeACP
  • ITfRangeAnchor
  • ITfRangeBackup
  • ITfReadOnlyProperty
  • ITfSource
  • ITfSourceSingle
  • ITfStatusSink
  • ITfSystemDeviceTypeLangBarItem
  • ITfSystemLangBarItem
  • ITfSystemLangBarItemSink
  • ITfTextEditSink
  • ITfTextInputProcessor
  • ITfTextLayoutSink
  • ITfThreadFocusSink
  • ITfThreadMgr
  • ITfThreadMgrEventSink


IAnchor

The IAnchor interface is implemented by applications that choose to implement ITextStoreACP. Objects exposing IAnchor represent positions within a text stream. The locations occupied by anchors lie between characters or regions. For example:

It is _anchor_cold today.

This shows a text stream where _anchor_ represents an anchor in the text stream just before the word cold. The IAnchor interface allows you to assess and adjust an anchor within a text stream.

If there are one or more anchors that occupy the same location, the anchors have no relative order.

Methods

IAnchor methods | Description
SetGravity | Specifies the forward or backward gravity of an anchor.
GetGravity | Receives a value from the TsGravity enumeration that specifies the current gravity of an anchor.
IsEqual | Evaluates two anchors within a text stream and returns a Boolean value that specifies the equality or inequality of the positions of two anchors.
Compare | Compares the relative position of two anchors within a text stream.
Shift | Moves an anchor forward or backward within a text stream.
ShiftTo | Moves an anchor to the same position as another anchor specified by the paSite parameter.
ShiftRegion | Moves the current anchor into a bordering region.
SetChangeHistoryMask | Sets the change history.
GetChangeHistory | Gets the change history.
ClearChangeHistory | Clears the change history.
Clone | Produces a new anchor object positioned at the same location, and of the same gravity, as the current anchor.

Remarks

Gravity determines how an anchor will react when text is inserted at the anchor position. For example:

It is _anchor_cold today.

If you insert the word very at the same position as the anchor, there are two possibilities for the result:

A. It is _anchor_very cold today.

B. It is very_anchor_ cold today.

The gravity parameter specifies in which direction the anchor should fall in relation to the text. TS_GR_GRAVITY_BACKWARD would result in case A, while TS_GR_GRAVITY_FORWARD would result in case B. Use this method to set the gravity value.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


IAnchor::ClearChangeHistory

The IAnchor::ClearChangeHistory method clears the change history.

HRESULT ClearChangeHistory(void);

Parameters

This method has no parameters.

Return Values

This method returns the standard HRESULT values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


IAnchor::Clone

The IAnchor::Clone method produces a new anchor object positioned at the same location, and of the same gravity, as the current anchor.

HRESULT Clone(
  IAnchor** ppaClone
);

Parameters

ppaClone
[out] Receives a new anchor object, identical to the current anchor.

Return Values

S_OK
The method completed successfully.
E_OUTOFMEMORY
The method failed due to insufficient memory. The ppaClone parameter will be set to NULL.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


IAnchor::Compare

The IAnchor::Compare method compares the relative position of two anchors within a text stream.

HRESULT Compare(
  IAnchor* paWith,
  LONG* plResult
);

Parameters

paWith
[in] An anchor to compare to the primary anchor. Used to determine the relative positions of the two anchors.
plResult
[out] Receives the result of the comparison between the two anchors.

Return Values

S_OK
The method completed successfully.

Remarks

IAnchor::Compare examines the two anchors and returns one of the following:

A value of -1: The primary anchor is positioned earlier in the text stream than paWith.

A value of 0: The primary anchor is positioned at the same location as paWith.

A value of +1: The primary anchor is positioned later in the text stream than paWith.

The value 0 is only returned when the two anchors are in a single region. Anchor positions include the spaces between regions. If you only need to determine if the two anchors are positioned at the same location, IAnchor::IsEqual is more efficient.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


IAnchor::GetChangeHistory

The IAnchor::GetChangeHistory method gets the change history.

HRESULT GetChangeHistory(
  DWORD* pdwHistory
);

Parameters

pdwHistory
[out] A bit field that specifies the change history.

Return Values

This method returns the standard HRESULT values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


IAnchor::GetGravity

The IAnchor::GetGravity method receives a value from the TsGravity enumeration that specifies the current gravity of an anchor.

HRESULT GetGravity(
  TsGravity* pgravity
);

Parameters

pgravity
[out] Value from the TsGravity enumeration that specifies the current gravity of an anchor.

Return Values

S_OK
The method completed successfully.

Remarks

The pgravity parameter will receive either TS_GR_GRAVITY_FORWARD or TS_GR_GRAVITY_BACKWARD. Gravity is a property of anchors that determines how they will react when text is inserted at their position. For example:

It is _anchor_cold today.

If the word very is inserted at the same position as the anchor there are two possibilities for the result:

A. It is _anchor_very cold today.

B. It is very_anchor_ cold today.

The pgravity parameter specifies in which direction the anchor will fall in relation to the text. TS_GR_GRAVITY_BACKWARD will result in case A, will TS_GR_GRAVITY_FORWARD would result in case B. Use this method to get the gravity value.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


IAnchor::IsEqual

The IAnchor::IsEqual method evaluates two anchors within a text stream and returns a Boolean value that specifies the equality or inequality of the positions of two anchors.

HRESULT IsEqual(
  IAnchor *paWith,
  BOOL *pfEqual
);

Parameters

paWith
[in] Specifies an anchor to compare to the primary anchor. Used to determine the equality of the two anchor positions.
pfEqual
[out] A Boolean value that specifies whether the two anchors are positioned at the same location. If set to TRUE, the two anchors occupy the same location. If set to FALSE, the two anchors do not occupy the same location.

Return Values

S_OK
The method completed successfully.

Remarks

Anchors are always positioned between characters or regions. When two anchors are between the same characters, being at the same offset within the text stream, and within the same region, IAnchor::IsEqual returns TRUE. Otherwise it returns FALSE.

IAnchor::Compare incorporates the same functionality as IAnchor::IsEqual. However, because IAnchor::IsEqual is more specific, it may have a more efficient implementation on the server.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


IAnchor::SetChangeHistoryMask

The IAnchor::SetChangeHistoryMask method sets the change history.

HRESULT SetChangeHistoryMask(
  DWORD dwMask
);

Parameters

dwMask
[in] A bit field that specifies the change history.

Return Values

This method returns the standard HRESULT values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


IAnchor::SetGravity

The IAnchor::SetGravity method specifies the forward or backward gravity of an anchor.

HRESULT SetGravity(
  TsGravity gravity
);

Parameters

gravity
[in] A value from the TsGravity enumeration specifying a new forward or backward gravity for the anchor.

Return Values

S_OK
The method completed successfully.

Remarks

Gravity determines how an anchor will react when text is inserted at the anchor position. For example:

It is _anchor_cold today.

If you inserts the word very at the same position as the anchor there are two possibilities for the result:

A. It is _anchor_very cold today.

B. It is very_anchor_ cold today.

The gravity parameter specifies in which direction the anchor should fall in relation to the text. TS_GR_GRAVITY_BACKWARD would result in case A, while TS_GR_GRAVITY_FORWARD would result in case B. Use this method to set the gravity value.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


IAnchor::Shift

The IAchor::Shift method moves an anchor forward or backward within a text stream. The number of characters the anchor moves is specified by the cchReq parameter. The value in cchReq may be negative, meaning a shift backward cchReq characters, or positive, meaning a shift forward cchReq characters. The actual number of characters shifted may be less than or equal to cchReq if the top or bottom of the document is encountered, a region boundary is encountered, or if paHaltAnchor receives an anchor that blocks the shift.

The pcch parameter will be positive if cchReg is positive; and negative if cchReg is negative.

HRESULT Shift(
  DWORD dwFlags,
  LONG cchReq,
  LONG *pcch,
  IAnchor *paHaltAnchor
);

Parameters

dwFlags
[in] Used with hidden text to avoid anchor positioning. When set to TS_SHIFT_COUNT_ONLY, the anchor is not repositioned.
cchReq
[in] Specifies the requested number of characters to move the anchor within a text stream.
pcch
[out] Receives the actual number of characters moved within a text stream.
paHaltAnchor
[in] Reference to an anchor blocking the shift.

Return Values

S_OK
The method completed successfully.

Remarks

The paHaltAnchor parameter will be ignored if set to NULL. Otherwise, if paHaltAnchor receives an anchor that blocks the shift, the application will truncate the shift at the position occupied by paHaltAnchor.

For example, if the anchor referenced by paHaltAnchor lies five characters ahead of the anchor in the stream, and a client calls Shift(10, &cchReg, paHaltAnchor), then on exit the anchor will have moved only five characters. If the anchor referenced by paHaltAnchor is equal to the current anchor to be moved, then Shift will return successfully without moving the anchor at all. In this case pcch will be 0, and the method will return a success. If paHaltAnchor is not within the span of text covered by the shift, it has no relevance to the shift and is ignored.

IAnchor::Shift is always blocked by region boundaries, as if the edge of the document was encountered. Clients should use IAnchor::ShiftRegion if pcch is smaller than requested on exit.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


IAnchor::ShiftRegion

The IAnchor::ShiftRegion method moves the current anchor into a bordering region. The dir parameter specifies the direction of the shift. If dir is set to TS_SD_BACKWARD, the shift is towards the head of the document. If dir is set to TS_SD_FORWARD, the shift is towards the end of the document.

HRESULT ShiftRegion(
  DWORD dwFlags,
  TsShiftDir dir,
  BOOL *pfNoRegion
);

Parameters

dwFlags
[in] Used with hidden text to avoid anchor positioning. When set to TS_SHIFT_COUNT_HIDDEN, the anchor will attemp to shift over any adjacent region boundary, Otherwise, the anchor will ignore any hidden text between the anchors current position and the next region boundary. When set to TS_SHIFT_COUNT_ONLY, the anchor is not repositioned.
dir
[in] Value from the TsShiftDir enumeration that specifies the direction to shift the anchor.
pfNoRegion
[out] Boolean value that specifies whether a shift occurred. If FALSE, the shift succeeded. If TRUE, the shift failed.

Return Values

S_OK
The method completed successfully.
E_NOTIMPL
The application does not support regions.

Remarks

If the anchor is not positioned immediately adjacent to a region ahead or behind, then pfNoRegion will be set to TRUE and the anchor will not be repositioned. Otherwise, the anchor will be repositioned opposite of the region it borders and pfNoRegion will be set to FALSE.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


IAnchor::ShiftTo

The IAnchor::ShiftTo method moves an anchor to the same position as another anchor specified by the paSite parameter.

HRESULT ShiftTo(
  IAnchor *paSite
);

Parameters

paSite
[in] Anchor occupying a position that the current anchor will be moved to.

Return Values

S_OK
The method completed successfully.

Remarks

Implementing the IAnchor::ShiftTo method is more efficient than an equivalent IAnchor::Shift operation.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


IEnumITfCompositionView

The IEnumITfCompositionView interface is implemented by Text Services Framework (TSF).

Methods in Vtable Order

IEnumITfCompositionView methods | Description
Clone | TBD
Next | TBD
Reset | TBD
Skip | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumITfCompositionView::Clone

TBD

HRESULT Clone(
  IEnumITfCompositionView** ppEnum
);

Parameters

ppEnum
[out] TBD

Return Values

TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

IEnumITfCompositionView


IEnumITfCompositionView::Next

TBD

HRESULT Next(
  ULONG ulCount
  ITfCompositionView** rgComposition
  ULONG* pcFetched
);

Parameters

ulCount
[in] TBD
rgComposition
[out] TBD
pcFetched
[out] TBD

Return Values

TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

IEnumITfCompositionView


IEnumITfCompositionView::Reset

TBD

HRESULT Reset(void);

Parameters

This method has no parameters.

Return Values

TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

IEnumITfCompositionView


IEnumITfCompositionView::Skip

TBD

HRESULT Skip(
  ULONG ulCount
);

Parameters

ulCount
[in] TBD

Return Values

TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

IEnumITfCompositionView


IEnumTfCandidates

The IEnumTfCandidates interface is implemented by a TSF Text Service for enumerating candidate strings. This interface includes methods that enable you to enumerate in a forward direction, skip objects, return to the beginning, and copy the enumerator. Individual candidate strings are accessed through the ITfCandidateString interface, implemented by a TSF Text Service.

Methods

IEnumTfCandidates methods | Description
Clone | Makes a deep copy of this enumerator object.
Next | Attempts to fetch one or more candidate strings, starting from the current cursor position.
Reset | Returns the cursor to the beginning of the candidate strings list.
Skip | Skips the specified number of items in the candidate strings list.

Remarks

The text processor implementing this interface will typically implement the ITfCandidateList interface to maintain a list of candidate strings.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfCandidateString, ITfCandidateList::EnumCandidates


IEnumTfCandidates::Clone

The IEnumTfCandidates::Clone method makes a deep copy of this enumerator object.

HRESULT Clone(
  IEnumTfCandidates **ppEnum
);

Parameters

ppEnum
[out] Reference to a new candidate enumerator.

Return Values

This method returns the standard HRESULT values including:

S_OK
The method completed successfully.
E_NOTIMPL
The method is not implemented yet.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


IEnumTfCandidates::Next

The IEnumTfCandidates::Next method attempts to fetch one or more candidate strings, starting from the current cursor position.

HRESULT Next(
  ULONG ulCount,
  ITfCandidateString **ppCand,
  ULONG *pcFetched
);

Parameters

ulCount
[in] Number of candidate strings to be fetched or the number of items in the array as pointed to by the ppCand parameter.
ppCand
[out] Reference to the array holding the requested candidate strings.
pcFetched
[out] Address of a value that receives the number of candidate strings actually returned in the ppCand array. This number can be smaller than the value specified in the ulCount parameter. This parameter can be NULL only if ulCount is 1.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.
S_FALSE
There are no more items in the enumeration sequence.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


IEnumTfCandidates::Reset

The IEnumTfCandidates::Reset method returns the cursor to the beginning of the candidate strings list.

HRESULT Reset(void);

Parameters

This method has no parameters.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


IEnumTfCandidates::Skip

The IEnumTfCandidates::Skip method skips the specified number of items in the candidate strings list.

HRESULT Skip(
  ULONG ulCount
);

Parameters

ulCount
[in] Number of candidate strings to skip.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


IEnumTfContexts

The IEnumTfContexts interface is implemented by Text Services Framework (TSF) to enumerate TSF context objects. This interface includes methods that enable you to enumerate in a forward direction, skip objects, begin again at the beginning, and copy the enumerator. The object implementing the IEnumTfContexts interface is also known as a context enumerator. Context objects are objects implementing the ITfContext interface, which is used to manipulate text and properties of a specific text stream.

Methods

IEnumTfContexts methods | Description
Clone | Makes a deep copy of this context enumeration object.
Next | Attempts to fetch one or more TSF context objects starting from the current cursor position.
Reset | Resets the context enumerator by moving the cursor to the beginning of the enumeration sequence.
Skip | Skips the specified number of TSF contexts in the enumeration sequence.

Remarks

The TSF object implementing this interface is also known as a context enumeration object or simply a context enumerator.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfContexts::Clone

The IEnumTfContexts::Clone method makes a deep copy of this context enumeration object.

HRESULT Clone(
  IEnumTfContexts **ppEnum
);

Parameters

ppEnum
[out] Reference to the new context enumerator.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.
E_NOTIMPL
The method is not implemented yet.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfContexts::Next

The IEnumTfContexts::Next method attempts to fetch one or more TSF context objects starting from the current cursor position.

HRESULT Next(
  ULONG ulCount,
  ITfContext **rgContext,
  ULONG *pcFetched
);

Parameters

ulCount
[in] Number of items to be fetched from the list of TSF contexts. This number is determined by the size of the array pointed to by the rgContext parameter.
rgContext
[out] Reference to the array of TSF contexts.
pcFetched
[out] Address of a value that receives the number of the items actually returned in rgContext. This number representing the count can be smaller than the value specified in the ulCount parameter. This parameter can be NULL only if ulCount is 1.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.
S_FALSE
There are no more items in the enumeration sequence.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfContexts::Reset

The IEnumTfContexts::Reset method resets the context enumerator by moving the cursor to the beginning of the enumeration sequence.

HRESULT Reset(void);

Parameters

This method has no parameters

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfContexts::Skip

The IEnumTfContexts::Skip method skips the specified number of TSF contexts in the enumeration sequence.

HRESULT Skip(
  ULONG ulCount
);

Parameters

ulCount
[in] Number of items from the enumeration sequence to skip.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfContextViews

The IEnumTfContextViews interface is implemented by Text Services Framework (TSF) for enumerating context view objects. Context view objects implement the ITfContextView interface. The IEnumTfContextViews interface includes methods that enable you to enumerate in a forward direction, skip objects, begin again at the beginning, and copy the enumerator. The ITfContextView interface enables you to access contextual information, such as the bounding box of the display surface, or the bounding box of a range of text.

Methods

IEnumTfContextViews methods | Description
Clone | Makes a deep copy of this enumerator object.
Next | Attempts to fetch one or more context view objects starting from the current cursor position.
Reset | Resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.
Skip | Skips the requested number of items in the list of context views.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfContextView, ITfContext


IEnumTfContextViews::Clone

The IEnumTfContextViews::Clone method makes a deep copy of this enumerator object.

HRESULT Clone(
  IEnumTfContextViews **ppEnum
);

Parameters

ppEnum
[out] Reference to the enumerator object for TSF context views.

Return Values

This method returns standard HRESULT values, including:

S_OK
The method completed successfully.
E_NOTIMPL
The method is not implemented yet.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfContextViews::Next

The IEnumTfContextViews::Next method attempts to fetch one or more context view objects starting from the current cursor position.

HRESULT Next(
  ULONG ulCount,
  ITfContextView **rgViews,
  ULONG *pcFetched
);

Parameters

ulCount
[in] Number of items to be fetched from the list of context views.
rgViews
[out] Reference to the array of requested context views.
pcFetched
[out] Address of a value that receives the number of items actually returned in rgViews. This number can be smaller than the value specified in the ulCount parameter. This parameter can be NULL only if ulCount is 1.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.
S_FALSE
The cursor has reached the end of the list.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfContextViews::Reset

The IEnumTfContextViews::Reset method resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.

HRESULT Reset(void);

Parameters

This method has no parameters.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfContextViews::Skip

The IEnumTfContextViews::Skip method skips the requested number of items in the list of context views.

HRESULT Skip(
  ULONG ulCount
);

Parameters

ulCount
[in] Number of items from the enumeration sequence to skip.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfDisplayAttributeInfo

The IEnumTfDisplayAttributeInfo interface is implemented by Text Services Framework (TSF) to enumerate display attribute information objects. This interface includes methods that allow you to enumerate in a forward direction, skip objects, begin again at the beginning, and copy the enumerator. Display attribute information objects are objects implementing the ITfDisplayAttributeInfo interface, which is used to retrieve display attribute information such as a GUID or description.

Methods

IEnumTfDisplayAttributeInfo methods | Description
Clone | Makes a deep copy of this enumerator object.
Next | Attempts to fetch one or more display attribute information objects starting from the current cursor position.
Reset | Resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.
Skip | Skips the number of item identifiers specified in ulCount.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfDisplayAttributeInfo::Clone

The IEnumTfDisplayAttributeInfo::Clone method makes a deep copy of this enumerator object.

HRESULT Clone(
  IEnumTfDisplayAttributeInfo **ppEnum
);

Parameters

ppEnum
[out] Reference to a new display attribute information enumerator.

Return Values

This method returns the standard HRESULT values including:

S_OK
The method completed successfully.
E_NOTIMPL
The method is not implemented yet.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfDisplayAttributeInfo::Next

The IEnumTfDisplayAttributeInfo::Next method attempts to fetch one or more display attribute information objects starting from the current cursor position.

HRESULT Next(
  ULONG ulCount,
  ITfDisplayAttributeInfo **rgInfo,
  ULONG *pcFetched
);

Parameters

ulCount
[in] Number of elements in the array pointed to by the rgInfo parameter.
rgInfo
[out] Reference to the array of requested display attribute information objects.
pcFetched
[out] Address of a value that receives a count of the item identifiers actually returned in rgInfo. The count can be smaller than the value specified in the ulCount parameter. This parameter can be NULL only if ulCount is 1.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.
S_FALSE
There are no more items in the enumeration sequence.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfDisplayAttributeInfo::Reset

The IEnumTfDisplayAttributeInfo::Reset method resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.

HRESULT Reset(void);

Parameters

This method has no parameters.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfDisplayAttributeInfo::Skip

The IEnumTfDisplayAttributeInfo::Skip method skips the number of item identifiers specified in ulCount.

HRESULT Skip(
  ULONG ulCount
);

Parameters

ulCount
[in] Number of items from the enumeration sequence to skip.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfDocumentMgrs

The IEnumTfDocumentMgrs interface is implemented by Text Services Framework to enumerate document manager objects. This interface includes methods that enable you to enumerate in a forward direction, skip objects, begin again at the beginning, and copy the enumerator. Document manager objects are objects implementing the ITfDocumentMgr interface, which is used to access an individual document manager.

Methods

IEnumTfDocumentMgrs methods | Description
Clone | Makes a deep copy of this enumerator object.
Next | Attempts to fetch one or more document manager objects starting from the current cursor position.
Reset | Resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.
Skip | Skips the number of item identifiers specified in ulCount.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfDocumentMgrs::Clone

The IEnumTfDocumentMgrs::Clone method makes a deep copy of this enumerator object.

HRESULT Clone(
  IEnumTfDocumentMgrs **ppEnum
);

Parameters

ppEnum
[out] Reference to a new document manager enumerator.

Return Values

This method returns the standard HRESULT values including:

S_OK
The method completed successfully.
E_NOTIMPL
The method is not implemented yet.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfDocumentMgrs::Next

The IEnumTfDocumentMgrs::Next method attempts to fetch one or more document manager objects starting from the current cursor position.

HRESULT Next(
  ULONG ulCount,
  ITfDocumentMgr **rgDocumentMgr,
  ULONG *pcFetched
);

Parameters

ulCount
[in] Number of elements in the array pointed to by the rgDocumentMgr parameter.
rgDocumentMgr
[out] Reference to the array of requested document manager objects.
pcFetched
[out] Address of a value that receives a count of the item identifiers actually returned in rgDocumentMgr. The count can be smaller than the value specified in the ulCount parameter. This parameter can be NULL only if ulCount is 1.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.
S_FALSE
There are no more items in the enumeration sequence.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfDocumentMgrs::Reset

The IEnumTfDocumentMgrs::Reset method resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.

HRESULT Reset(void);

Parameters

This method has no parameters.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfDocumentMgrs::Skip

The IEnumTfDocumentMgrs::Skip method skips the number of item identifiers specified in ulCount.

HRESULT Skip(
  ULONG ulCount
);

Parameters

ulCount
[in] Number of items from the enumeration sequence to skip.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfFunctionProviders

The IEnumTfFunctionProviders interface is implemented by a TSF Text Service to enumerate function provider objects. This interface includes methods that enumerate in a forward direction, skip objects, begin again at the beginning, and copy the enumerator. Function provider objects are objects that implement the ITfFunctionProvider interface.

Methods

IEnumTfFunctionProviders methods | Description
Clone | Makes a deep copy of this enumerator object.
Next | Attempts to fetch one or more function provider objects starting from the current cursor position.
Reset | Resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.
Skip | Skips the number of item identifiers specified in ulCount.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfFunctionProviders::Clone

The IEnumTfFunctionProviders::Clone method makes a deep copy of this enumerator object.

HRESULT Clone(
  IEnumTfFunctionProviders **ppEnum
);

Parameters

ppEnum
[out] Reference to a new function provider enumerator.

Return Values

This method returns the standard HRESULT values including:

S_OK
The method completed successfully.
E_NOTIMPL
The method is not implemented.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfFunctionProviders::Next

The IEnumTfFunctionProviders::Next method attempts to fetch one or more function provider objects starting from the current cursor position.

HRESULT Next(
  ULONG ulCount,
  ITfFunctionProvider **ppCmdobj,
  ULONG *pcFetch
);

Parameters

ulCount
[in] Number of elements in the array pointed to by the ppCmdobj parameter.
ppCmdobj
[out] Reference to the array of requested function provider objects.
pcFetch
[out] Address of a value that receives a count of the item identifiers actually returned in ppCmdobj. The count can be smaller than the value specified in the ulCount parameter. This parameter can be NULL only if ulCount is 1.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.
S_FALSE
There are no more items in the enumeration sequence.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfFunctionProviders::Reset

The IEnumTfFunctionProviders::Reset method resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.

HRESULT Reset(void);

Parameters

This method has no parameters.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfFunctionProviders::Skip

The IEnumTfFunctionProviders::Skip method skips the number of item identifiers specified in ulCount.

HRESULT Skip(
  ULONG ulCount
);

Parameters

ulCount
[in] Number of item identifiers to skip.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfLangBarItems

The IEnumTfLangBarItems interface is implemented by a TSF Text Service to enumerate language bar item objects. This interface includes methods that enable you to enumerate in a forward direction, skip objects, begin again at the beginning, and copy the enumerator. Language bar item objects are objects implementing the ITfLangBarItem interface, which is used to access details of items of a language bar.

Methods

IEnumTfLangBarItems methods | Description
Clone | Makes a deep copy of this enumerator object.
Next | Attempts to fetch one or more language bar item objects starting from the current cursor position.
Reset | Resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.
Skip | Skips the number of item identifiers specified in the ulCount parameter.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


IEnumTfLangBarItems::Clone

The IEnumTfLangBarItems::Clone method makes a deep copy of this enumerator object.

HRESULT Clone(
  IEnumTfLangBarItems **ppEnum
);

Parameters

ppEnum
[out] Reference to a new language bar item enumerator.

Return Values

This method returns the standard HRESULT values including:

S_OK
The method completed successfully.
E_NOTIMPL
The method is not implemented.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


IEnumTfLangBarItems::Next

The IEnumTfLangBarItems::Next method attempts to fetch one or more language bar item objects starting from the current cursor position.

HRESULT Next(
  ULONG ulCount,
  ITfLangBarItem **ppItem,
  ULONG *pcFetched
);

Parameters

ulCount
[in] Number of elements in the array pointed by the ppItem parameter.
ppItem
[out] Reference to the array of the requested language bar item objects.
pcFetched
[in,out,unique] Address of a value that receives the number of the items actually returned in ppItem. This number representing the count can be smaller than the value specified in the ulCount parameter. This parameter can be NULL only if ulCount is 1.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.
S_FALSE
There are no more items in the enumeration sequence.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


IEnumTfLangBarItems::Reset

The IEnumTfLangBarItems::Reset method resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.

HRESULT Reset(void);

Parameters

This method has no parameters.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


IEnumTfLangBarItems::Skip

The IEnumTfLangBarItems::Skip method skips the number of item identifiers specified in the ulCount parameter.

HRESULT Skip(
  ULONG ulCount
);

Parameters

ulCount
[in] Number of items from the enumeration sequence to skip.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


IEnumTfLanguageProfiles

The IEnumTfLanguageProfiles interface is implemented by TSF to enumerate the TF_LANGUAGEPROFILE data structure. This interface enables you to enumerate in a forward direction, skip data structures, begin again at the beginning, and copy the enumerator. The TF_LANGUAGEPROFILE data structure represent the language profile supplied by a TSF Text Service.

Methods

IEnumTfLanguageProfiles methods | Description
Clone | Makes a deep copy of this enumerator object.
Next | Attempts to fetch one or more TF_LANGUAGEPROFILE data structures starting from the current cursor position.
Reset | Resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.
Skip | Skips the number of item identifiers specified in ulCount.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfLanguageProfiles::Clone

The IEnumTfLanguageProfiles::Clone method makes a deep copy of this enumerator object.

HRESULT Clone(
  IEnumTfLanguageProfiles **ppEnum
);

Parameters

ppEnum
[out] Reference to a new TF_LANGUAGEPROFILE data structure enumerator.

Return Values

This method returns the standard HRESULT values including:

S_OK
The method completed successfully.
E_NOTIMPL
The method is not implemented.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfLanguageProfiles::Next

The IEnumTfLanguageProfiles::Next method attempts to fetch one or more TF_LANGUAGEPROFILE data structures starting from the current cursor position.

HRESULT Next(
  ULONG ulCount,
  TF_LANGUAGEPROFILE *pProfile,
  ULONG *pcFetch
);

Parameters

ulCount
[in] Number of elements in the array pointed to by the pProfile parameter.
pProfile
[out] Reference to the array of requested TF_LANGUAGEPROFILE data structures.
pcFetch
[out] Address of a value that receives a count of the item identifiers actually returned in pProfile. The count can be smaller than the value specified in the ulCount parameter. This parameter can be NULL only if ulCount is 1.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.
S_FALSE
There are no more items in the enumeration sequence.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfLanguageProfiles::Reset

The IEnumTfLanguageProfiles::Reset method resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.

HRESULT Reset(void);

Parameters

This method has no parameters.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfLanguageProfiles::Skip

The IEnumTfLanguageProfiles::Skip method skips the number of item identifiers specified in ulCount.

HRESULT Skip(
  ULONG ulCount
);

Parameters

ulCount
[in] Number of items from the enumeration sequence to skip.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfLatticeElements

The IEnumTfLatticeElements interface is implemented to enumerate the TF_LMLATTELEMENT data structure. This interface allow you to enumerate in a forward direction, skip data structures, start at the beginning, and copy the enumerator. The TF_LMLATTELEMENT data structures represent an element of the lattice data for TSF clients to share a common language model.

Methods

IEnumTfLatticeElements methods | Description
Clone | Makes a deep copy of this enumerator object.
Next | Attempts to fetch one or more TF_LMLATTELEMENT data structures starting from the current cursor position.
Reset | Resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.
Skip | Skips the number of item identifiers specified in the ulCount parameter.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


IEnumTfLatticeElements::Clone

The IEnumTfLatticeElements::Clone method makes a deep copy of this enumerator object.

HRESULT Clone(
  IEnumTfLatticeElements **ppEnum
);

Parameters

ppEnum
[out] Reference to a new TF_LMLATTELEMENT data structure enumerator.

Return Values

This method returns the standard HRESULT values including:

S_OK
The method completed successfully.
E_NOTIMPL
The method is not implemented yet.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


IEnumTfLatticeElements::Next

The IEnumTfLatticeElements::Next method attempts to fetch one or more TF_LMLATTELEMENT data structures starting from the current cursor position.

HRESULT Next(
  ULONG ulCount,
  TF_LMLATTELEMENT *rgsElements,
  ULONG *pcFetched
);

Parameters

ulCount
[in] Number of elements in the array pointed to by the rgsElements parameter.
rgsElements
[out] Reference to the array of requested TF_LMLATTELEMENT data structures.
pcFetched
[out] Address of a value that receives a count of the item identifiers actually returned in rgsElements. The count can be smaller than the value specified in the ulCount parameter. This parameter can be NULL only if ulCount is 1.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.
S_FALSE
There are no more items in the enumeration sequence.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


IEnumTfLatticeElements::Reset

The IEnumTfLatticeElements::Reset method resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.

HRESULT Reset(void);

Parameters

This method has no parameters.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


IEnumTfLatticeElements::Skip

The IEnumTfLatticeElements::Skip method skips the number of item identifiers specified in the ulCount parameter.

HRESULT Skip(
  ULONG ulCount
);

Parameters

ulCount
[in] Number of items from the enumeration sequence to skip.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


IEnumTfProperties

The IEnumTfProperties interface is implemented by TSF to enumerate property objects. This interface allow you to enumerate in a forward direction, skip objects, start the beginning, and copy the enumerator. Property objects are objects implementing the ITfProperty interface, which is used to access property information.

Methods

IEnumTfProperties methods | Description
Clone | Makes a deep copy of this enumerator object.
Next | Attempts to fetch one or more property objects starting from the current cursor position.
Reset | Resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.
Skip | Skips the number of item identifiers specified in ulCount.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfProperties::Clone

The IEnumTfProperties::Clone method makes a deep copy of this enumerator object.

HRESULT Clone(
  IEnumTfProperties **ppEnum
);

Parameters

ppEnum
[out] Reference to a new property object enumerator.

Return Values

This method returns the standard HRESULT values including:

S_OK
The method completed successfully.
E_NOTIMPL
The method is not implemented.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfProperties::Next

The IEnumTfProperties::Next method attempts to fetch one or more property objects starting from the current cursor position.

HRESULT Next(
  ULONG ulCount,
  ITfProperty **ppProp,
  ULONG *pcFetched
);

Parameters

ulCount
[in] Number of elements in the array pointed to by the ppProp parameter.
ppProp
[out] Reference to the array of requested property objects.
pcFetched
[out] Address of a value that receives a count of the item identifiers actually returned in ppProp. The count can be smaller than the value specified in the ulCount parameter. This parameter can be NULL only if ulCount is 1.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.
S_FALSE
There are no more items in the enumeration sequence.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfProperties::Reset

The IEnumTfProperties::Reset method resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.

HRESULT Reset(void);

Parameters

This method has no parameters.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfProperties::Skip

The IEnumTfProperties::Skip method skips the number of item identifiers specified in ulCount.

HRESULT Skip(
  ULONG ulCount
);

Parameters

ulCount
[in] Number of items from the enumeration sequence to skip.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfPropertyValue

The IEnumTfPropertyValue interface is implemented by TSF to enumerate the TF_PROPERTYVAL data structures. This interface enables you to enumerate in a forward direction, skip data structures, start at the beginning, and copy the enumerator. The TF_PROPERTYVAL data structures hold the value of any property within TSF.

Methods

IEnumTfPropertyValue methods | Description
Clone | Makes a deep copy of this enumerator object.
Next | Attempts to fetch one or more TF_PROPERTYVAL data structures starting from the current cursor position.
Reset | Resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.
Skip | Skips the number of item identifiers specified in the ulCount parameter.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfPropertyValue::Clone

The IEnumTfPropertyValue::Clone method makes a deep copy of this enumerator object.

HRESULT Clone(
  IEnumTfPropertyValue **ppEnum
);

Parameters

ppEnum
[out] Reference to a new TF_PROPERTYVAL data structure enumerator.

Return Values

This method returns the standard HRESULT values including:

S_OK
The method completed successfully.
E_NOTIMPL
The method is not implemented yet.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfPropertyValue::Next

The IEnumTfPropertyValue::Next method attempts to fetch one or more TF_PROPERTYVAL data structures starting from the current cursor position.

HRESULT Next(
  ULONG ulCount,
  TF_PROPERTYVAL *rgValues,
  ULONG *pcFetched
);

Parameters

ulCount
[in] Number of elements in the array pointed to by the rgValues parameter.
rgValues
[out] Reference to the array of requested TF_PROPERTYVAL data structures.
pcFetched
[out] Address of a value that receives a count of the item identifiers actually returned in rgValues. The count can be smaller than the value specified in the ulCount parameter. This parameter can be NULL only if ulCount is 1.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.
S_FALSE
There are no more items in the enumeration sequence.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfPropertyValue::Reset

The EnumTfPropertyValue::Reset method resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.

HRESULT Reset(void);

Parameters

This method has no parameters.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfPropertyValue::Skip

The EnumTfPropertyValue::Skip method skips the number of item identifiers specified in the ulCount parameter.

HRESULT Skip(
  ULONG ulCount
);

Parameters

ulCount
[in] Number of items from the enumeration sequence to skip.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfRanges

The IEnumTfRanges interface is implemented by TSF to enumerate range objects. This interface includes methods that allow you to enumerate in a forward direction, skip objects, start at the beginning, and copy the enumerator. Range objects are objects implementing the ITfRange interface, which is used by clients of TSF to reference and manipulate text within a given context.

Methods

IEnumTfRanges methods | Description
Clone | Makes a deep copy of this enumerator object.
Next | Attempts to fetch one or more range objects starting from the current cursor position.
Reset | Resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.
Skip | Skips the number of item identifiers specified in ulCount.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfRanges::Clone

The IEnumTfRanges::Clone method makes a deep copy of this enumerator object.

HRESULT Clone(
  IEnumTfRanges **ppEnum
);

Parameters

ppEnum
[out] Reference to a new range object enumerator.

Return Values

This method returns the standard HRESULT values including:

S_OK
The method completed successfully.
E_NOTIMPL
The method is not implemented.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfRanges::Next

The IEnumTfRanges::Next method attempts to fetch one or more range objects starting from the current cursor position.

HRESULT Next(
  ULONG ulCount,
  ITfRange** ppRange,
  ULONG* pcFetched
);

Parameters

ulCount
[in] Number of elements in the array pointed to by the ppRange parameter.
ppRange
[out] Reference to the array of requested range objects.
pcFetched
[out] Address of a value that receives a count of the item identifiers actually returned in ppRange. The count can be smaller than the value specified in ulCount. This parameter can be NULL only if ulCount is 1.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.
S_FALSE
There are no more items in the enumeration sequence.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfRanges::Reset

The IEnumTfRanges::Reset method resets the enumerator object by moving the cursor to the beginning of the enumeration sequence.

HRESULT Reset(void);

Parameters

This method has no parameters.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


IEnumTfRanges::Skip

The IEnumTfRanges::Skip method skips the number of item identifiers specified in ulCount.

HRESULT Skip(
  ULONG ulCount
);

Parameters

ulCount
[in] Number of items from the enumeration sequence to skip.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITextStoreACP

The ITextStoreACP interface enables an application to share text streams, or text stores, with Text Services Framework (TSF) TSF Text Services. Each document is exposed as a stream of Unicode characters, some of which might reference embedded content. This interface is implemented by an application or control, and clients read and potentially modify the document content using this interface.

In the case of this interface, ITextStoreACP, text stores are exposed by using a character offset, or Application Character Position (ACP), based format. Text stores are also exposed by using an anchor-based format through the ITextStoreAnchor interface.

Methods

ITextStoreACP methods | Description
AdviseSink | Called by the client to find the sink interface on the server. The sink interface is specified by the punk parameter.
UnadviseSink | Called by the client to indicate that it no longer requires notifications from the server. The server should release the sink interface, and cease sending notifications on it.
RequestLock | Grants a lock in order for clients to read or modify a document. The lock itself has the form of a call by the application to ITextStoreACPSink::OnLockGranted. Inside the scope of ITextStoreACPSink::OnLockGranted, the client may read or modify text.
GetStatus | Provides the general document status.
QueryInsert | TBD
GetSelection | Returns the offsets of any selected text within the document.
SetSelection | Selects text within the document.
GetText | Returns plain text information along a span of text.
SetText | Replaces a text string in the document.
GetFormattedText | Returns formatted text information along a text string.
GetEmbedded | Retrieves embedded content.
QueryInsertEmbedded | TBD
InsertEmbedded | Inserts the selected text object within a text stream.
InsertTextAtSelection | TBD
InsertEmbeddedAtSelection | TBD
RequestSupportedAttrs | TBD
RequestAttrsAtPosition | TBD
RequestAttrsTransitioningAtPosition | TBD
FindNextAttrTransition | TBD
RetrieveRequestedAttrs | TBD
GetEndACP | Returns the character count of the document.
GetActiveView | Returns a cookie that specifies the current active view.
GetACPFromPoint | Converts a point in screen coordinates to a character offset.
GetTextExt | Returns the bounding box in screen coordinates of a range of text.
GetScreenExt | Returns the bounding box of the display surface upon which this text stream is rendered.
GetWnd | Returns an HWND corresponding to the current document, if one exists.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.
Library: Included as a resource in Msctf.dll.

See Also

ITextStoreAnchor


ITextStoreACP::AdviseSink

The ITextStoreACP::AdviseSink method is called by the client to find the sink interface on the server. The sink interface is specified by the punk parameter.

HRESULT AdviseSink(
  REFIID riid,
  IUnknown *punk,
  DWORD dwMask
);

Parameters

riid
[in] Specifies the sink interface.
punk
[in] Pointer to the sink interface. Must not be NULL.
dwMask
[in] Specifies which methods on the sink the server should call.

Return Values

S_OK
The method completed successfully.
CONNECT_E_ADVISELIMIT
A sink has already been installed.
E_INVALIDARG
Specified interface riid was unsupported.

Remarks

Subsequent calls with the same interface, represented by the punk parameter, are treated as requests to update the dwMask parameter. Servers should not call AddRef on the sink in response to such a request.

Servers should not assume that the punk parameter is IUnknown, and should use QueryInterface to get an IUnknown value for identity comparison purposes.

Servers will only maintain a single connection point. Attempts to advise a second sink will fail until the original sink is unadvised.

Clients should use ITextStoreACP::UnadviseSink to disconnect the sink object when notifications are no longer required.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::FindNextAttrTransition

TBD

HRESULT FindNextAttrTransition(
  LONG acpStart,
  LONG acpHalt,
  ULONG cFilterAttrs,
  const TS_ATTRID *paFilterAttrs,
  DWORD dwFlags,
  LONG *pacpNext,
  BOOL *pfFound,
  LONG *plFoundOffset
);

Parameters

acpStart
[in] TBD
acpHalt
[in] TBD
cFilterAttrs
[in] TBD
TS_ATTRID paFilterAttrs
[in] TBD
dwFlags
[in] TBD
pacpNext
[out] TBD
pfFound
[out] TBD
plFoundOffset
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::GetACPFromPoint

The ITextStoreACP::GetACPFromPoint method converts a point in screen coordinates to a character offset.

HRESULT GetACPFromPoint(
  TsViewCookie vcView,
  const POINT *ptScreen,
  DWORD dwFlags,
  LONG *pacp
);

Parameters

vcView
[in] TBD
POINT ptScreen
[in] A point in screen coordinates.
dwFlags
[in] A bit field specifying how to handle exceptional cases.
pacp
[out] Receives the character offset corresponding to ptScreen.

Return Values

S_OK
The method completed successfully.
TS_E_NOLAYOUT
The application has not calculated a text layout yet.
TS_E_INVALIDPOINT
The ptScreen parameter is not within the bounding box of any character.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::GetActiveView

The ITextStoreACP::GetActiveView method returns a cookie that specifies the current active view.

HRESULT GetActiveView(
  TsViewCookie *pvcView
);

Parameters

pvcView
[out] Cookie that specifies the current active view.

Return Values

This method returns the standard HRESULT values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::GetEmbedded

The ITextStoreACP::GetEmbedded method retrieves embedded content.

HRESULT GetEmbedded(
  LONG acpPos,
  REFGUID rguidService,
  REFIID riid,
  IUnknown **ppunk
);

Parameters

acpPos
[in] An offset within the stream that corresponds to embedded content.
rguidService
[in] Specifies how the embedded content should be retrieved.
riid
[in] The interface to load into the ppunk out parameter.
ppunk
[out] The object interface pointer. It may be safely cast to match riid.

Return Values

S_OK
The method completed successfully.
E_NOTIMPL
The implementing application does not expose embedded objects in its stream.
TS_E_NOOBJECT
The acpPos parameter is not positioned before a TF_CHAR_EMBEDDED character.
TF_E_INVALIDPOS
The acpPos parameter is not positioned within the text stream.
TS_E_NOINTERFACE
The object does not support the requested interface.
TS_E_NOSERVICE
The content cannot be returned to match the service GUID.
TS_E_NOLOCK
The caller does not have a read lock.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::GetEndACP

The ITextStoreACP::GetEndACP method returns the character count of the document.

HRESULT GetEndACP(
  LONG *pacp
);

Parameters

pacp
[out] Receives the offset of the last character in the document plus one.

Return Values

S_OK
The method completed successfully.
E_NOTIMPL
The application has not implemented this method.
TS_E_NOLOCK
The caller does not have a read lock.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::GetFormattedText

The ITextStoreACP::GetFormattedText method returns formatted text information along a text string.

HRESULT GetFormattedText(
  LONG acpStart,
  LONG acpEnd,
  IDataObject **ppDataObject
);

Parameters

acpStart
[in] Offset at which to start.
acpEnd
[in] Offset at which to stop. Ignored if value is –1.
ppDataObject
[out] TBD

Return Values

This method returns the standard HRESULT values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::GetScreenExt

The ITextStoreACP::GetScreenExt method returns the bounding box of the display surface upon which this text stream is rendered.

HRESULT GetScreenExt(
  TsViewCookie vcView,
  RECT *prc
);

Parameters

vcView
[in] Cookie that specifies the display surface.
prc
[out] Receives the bounding box, in screen coordinates, of the display surface of the document.

Return Values

S_OK
The method completed successfully.

Remarks

If the text is not currently displayed, for example, if the document window is minimized, the prc parameter will be set to { 0, 0, 0, 0 }.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::GetSelection

The ITextStoreACP::GetSelection method returns the offsets of any selected text within the document.

HRESULT GetSelection(
  ULONG ulIndex,
  ULONG ulCount,
  TS_SELECTION_ACP *pSelection,
  ULONG *pcFetched
);

Parameters

ulIndex
[in] Specifies with which selection to start the process.
ulCount
[in] The maximum number of selections to return.
pSelection
[out] Value from the TS_SELECTION_ACP structure, which represents an ACP-based text selection used by TSF-aware applications.
pcFetched
[out] The number of structures in pSelection actually returned.

Return Values

S_OK
The method completed successfully.
TS_E_NOSELECTION
The document has no selection.
TS_E_NOLOCK
The caller does not have a read or write lock.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.
Library: Included as a resource in Msctf.dll.

See Also

TS_SELECTION_ACP


ITextStoreACP::GetStatus

The ITextStoreACP::GetStatus method provides the general document status.

HRESULT GetStatus(
  TS_STATUS *pdcs
);

Parameters

pdcs
[out] Value from the TS_STATUS structure that provides the general document status. Must not be NULL.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::GetText

The ITextStoreACP::GetText method returns plain text information along a span of text.

HRESULT GetText(
  LONG acpStart,
  LONG acpEnd,
  WCHAR *pchPlain,
  ULONG cchPlainReq,
  ULONG *pcchPlainRet,
  TS_RUNINFO *prgRunInfo,
  ULONG cRunInfoReq,
  ULONG *pcRunInfoRet,
  LONG *pacpNext,
);

Parameters

acpStart
[in] Offset at which to start.
acpEnd
[in] Offset at which to stop. Ignored if the value is –1.
pchPlain
[out] Buffer to receive the text. May be NULL, in which case cchPlainReq must be 0.
cchPlainReq
[in] Buffer size in characters.
pcchPlainRet
[out] Count of characters copied into the buffer. Must not be NULL, even if the values are not required. Use a dummy variable instead if that is the case.
prgRunInfo
[out] TBD
pulRunInfo
[out] Buffer to receive run lengths. May be NULL, in which case cRunInfoReq must be 0.
cRunInfoReq
[in] Buffer size in ULONGs.
pcRunInfoRet
[out] Returns count of ULONGs written to the buffer. Must not be NULL.
pacpNext
[out] Returns offset of the next unread character. Must not be NULL.

Return Values

S_OK
The method completed successfully.
TF_E_NOLOCK
The caller does not have a read lock.
TF_E_INVALIDPOS
The acpStart parameter is outside of the document text.

Remarks

In addition to filling a buffer with Unicode characters, ITextStoreACP::GetText returns an array of character counts specifying where the Unicode lies within the stream. The pfFirstRunIsText parameter specifies whether the first run is plain text or formatting data.

Applications may also truncate return values for internal reasons. Callers should carefully examine return characters and run counts, and call ITextStoreACP::GetText repeatedly, if necessary.

The caller may request plain text only by setting cRunInfoReq to 0 and prgRunInfo to NULL. However, the caller must still supply valid non-null values for pcRunInfoRet and pfFirstRunIsText, even though they will not be used. This is a feature of how the underlying marshaling code works.

Similarly, the caller may request only run information by setting cchPlainReq to 0 and pchPlain to NULL. However, the caller must still supply valid non-null values for pcchPlainRet, even though it will not be used.

If acpEnd is -1, then it should be treated as if it were set at the very end of the stream. Otherwise, it will be greater than or equal to zero.

On exit, pacpNext should be set to the offset of the next character in the stream not referenced by the return values. A caller would use this to quickly scan text with multiple ITextStoreACP::GetText calls.

The pchText parameter may be NULL only when cchReq is 0. Similarly, prgRunInfo may be NULL only when cRunInfoReq is 0.

ITextStoreACP::GetText should embed TS_CHAR_REGION characters at the positions of any region boundaries within returned text.

Callers must hold a read lock, obtained through ITextStoreACP::RequestLock; otherwise, ITextStoreACP::GetText will fail with TF_E_NOLOCK.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::GetTextExt

The ITextStoreACP::GetTextExt method returns the bounding box in screen coordinates of a range of text.

HRESULT GetTextExt(
  TsViewCookie vcView,
  LONG acpStart,
  LONG acpEnd,
  RECT *prc,
  BOOL *pfClipped
);

Parameters

vcView
[in] TBD
acpStart
[in] Offset of the start of the text range.
acpEnd
[in] Offset of the end of the text range.
prc
[out] Receives the bounding box in screen coordinates of the text range.
pfClipped
[out] Specifies whether or not prc has been clipped.

Return Values

S_OK
The method completed successfully.
TS_E_NOLAYOUT
The application has not calculated a text layout yet.
TS_E_INVALIDPOS
The range specified by acpStart and acpEnd extends past the end of the document or the top of the document.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::GetWnd

The ITextStoreACP::GetWnd method returns an HWND corresponding to the current document, if one exists.

HRESULT GetWnd(
  TsViewCookie vcView,
  HWND *phwnd
);

Parameters

vcView
[in] Cookie that corresponds to the current document.
phwnd
[out] Receives an HWND corresponding to the current document, which may be NULL if the document does not have a corresponding HWND or does not know of its corresponding HWND.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::InsertEmbedded

The ITextStoreACP::InsertEmbedded method inserts the selected text object within a text stream.

HRESULT InsertEmbedded(
  DWORD dwFlags,
  LONG acpStart,
  LONG acpEnd,
  IDataObject *pDataObject,
  TS_TEXTCHANGE *pChange
);

Parameters

dwFlags
[in] TBD
acpStart
[in] Offset at which to start. The new text object will be inserted at this location.
acpEnd
[in] Offset at which to stop. The new text object will be inserted at this location.
pDataObject
[in] A data transfer object the application uses to obtain a copy of the content to insert.
pChange
[out] Structure that receives offsets of modified text. The application must fill this structure with offsets of the old and new extents of any modified text, including formatting characters.

Return Values

S_OK
The method completed successfully.
E_NOTIMPL
The implementing application does not allow adapters to insert embedded objects into its stream.
TS_E_NOLOCK
The caller does not have a write lock.
TS_E_INVALIDPOS
The acpPos parameter is not positioned within the text stream.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::InsertEmbeddedAtSelection

TBD

HRESULT InsertEmbeddedAtSelection(
  DWORD dwFlags,
  IDataObject* pDataObject,
  LONG* pacpStart,
  LONG* pacpEnd,
  TS_TEXTCHANGE* pChange
);

Parameters

dwFlags
[in] TBD
pDataObject
[in] TBD
pacpStart
[out] TBD
pacpEnd
[out] TBD
pChange
[out] TBD

Return Values

This method returns the standard HRESULT values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::InsertTextAtSelection

TBD

HRESULT InsertTextAtSelection(
  DWORD dwFlags,
  const WCHAR* pchText,
  ULONG cch,
  LONG* pacpStart,
  LONG* pacpEnd,
  TS_TEXTCHANGE* pChange
);

Parameters

dwFlags
[in] TBD
pchText
[in] TBD
cch
[in] TBD
pacpStart
[out] TBD
pacpEnd
[out] TBD
pChange
[out] TBD

Return Values

This method returns the standard HRESULT values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::QueryInsert

TBD

HRESULT QueryInsert(
  LONG acpTestStart,
  LONG acpTestEnd,
  ULONG cch,
  LONG *pacpResultStart,
  LONG *pacpResultEnd
);

Parameters

acpTestStart
[in] TBD
acpTestEnd
[in] TBD
cch
[in] TBD
pacpResultStart
[out] TBD
pacpResultEnd
[out] TBD

Return Values

This method returns the standard HRESULT values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::QueryInsertEmbedded

TBD

HRESULT QueryInsertEmbedded(
  const GUID* pguidService,
  const FORMATETC* pFormatEtc,
  BOOL* pfInsertable
);

Parameters

pguidService
[in] TBD
pFormatEtc
[in] TBD
pfInsertable
[out] TBD

Return Values

This method returns the standard HRESULT values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::RequestAttrsAtPosition

TBD

HRESULT RequestAttrsAtPosition(
  LONG acpPos,
  ULONG cFilterAttrs,
  const TS_ATTRID *paFilterAttrs,
  DWORD dwFlags
);

Parameters

acpPos
[in] TBD
cFilterAttrs
[in] TBD
TS_ATTRID paFilterAttrs
[in] TBD
dwFlags
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::RequestAttrsTransitioningAtPosition

TBD

HRESULT RequestAttrsTransitioningAtPosition(
  LONG acpPos,
  ULONG cFilterAttrs,
  const TS_ATTRID *paFilterAttrs,
  DWORD dwFlags
);

Parameters

acpPos
[in] TBD
cFilterAttrs
[in]TBD
TS_ATTRID paFilterAttrs
[in] TBD
dwFlags
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::RequestLock

The ITextStoreACP::RequestLock method grants a lock in order for clients to read or modify a document. The lock itself has the form of a call by the application to ITextStoreACPSink::OnLockGranted. Inside the scope of ITextStoreACPSink::OnLockGranted, the client may read or modify text.

HRESULT RequestLock(
  DWORD dwLockFlags,
  HRESULT *phrSession
);

Parameters

dwLockFlags
[in] Specifies the type of lock requested.
phrSession
[out] Receives an HRESULT specifying the result of the request. TS_S_ASYNC signifies that ITextStoreACPSink::OnLockGranted will be called back asynchronously. TS_E_SYNCHRONOUS signifies that the synchronous request was not granted. Any other value signifies that the lock was granted synchronously. This value is returned by ITextStoreACPSink::OnLockGranted.

Return Values

S_OK
The method completed successfully.

Remarks

Inside ITextStoreACP::RequestLock, the application has the option of immediately calling ITextStoreACP::OnLockGranted or it may set some internal state, return from the method call with phrSession set to TS_S_ASYNC, and call ITextStoreACP::OnLockGranted when it is ready.

Applications must never modify the document or send change notifications with ITextStoreACPSink::OnTextChange from inside ITextStoreACP::RequestLock. If the application has pending changes to report, it may only respond to the lock request asynchronously.

Applications should not attempt to queue multiple ITextStoreACP::RequestLock calls. No matter how many times a client calls ITextStoreACP::RequestLock before actually receiving an OnLockGranted callback, the application only needs to make a single callback. If the caller makes several read requests and one or more write requests, however, the callback should be for write access.

Similarly, successful requests for synchronous locks supercede requests for asynchronous locks. Unsuccessful requests for synchronous locks do not supercede requests for asynchronous locks The implementation must still serve the outstanding asynchronous request if one exists.

If the lock is granted synchronously (before RequestLock returns), phrSession will receive the HRESULT returned by ITextStoreACPSink::OnLockGranted. If the call is successful but the lock will be granted at a later time, phrSession receives TS_S_ASYNC. The phrSession parameter should be ignored if ITextStoreACP::RequestLock returns anything other than S_OK.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::RequestSupportedAttrs

TBD

HRESULT RequestSupportedAttrs(
  DWORD dwFlags,
  ULONG cFilterAttrs,
  const TS_ATTRID *paFilterAttrs
);

Parameters

dwFlags
[in] TBD
cFilterAttrs
[in] TBD
TS_ATTRID paFilterAttrs
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::RetrieveRequestedAttrs

TBD

HRESULT RetrieveRequestedAttrs(
  ULONG ulCount,
  TS_ATTRVAL *paAttrVals,
  ULONG *pcFetched
);

Parameters

ulCount
[in] TBD
paAttrVals
[out] TBD
pcFetched
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::SetSelection

The ITextStoreACP::SetSelection method selects text within the document.

HRESULT SetSelection(
  ULONG ulCount,
  const TS_SELECTION_ACP *pSelection
);

Parameters

ulCount
[in] Number of selection runs in pSelection.
TS_SELECTION_ACP pSelection
[in] Value from the TS_SELECTION_ACP structure which represents an ACP-based text selection used by TSF aware applications.

Return Values

S_OK
The method completed successfully.
TF_E_NOLOCK
The caller does not have a write lock.

Remarks

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.
Library: Included as a resource in Msctf.dll.

See Also

TS_SELECTION_ACP


ITextStoreACP::SetText

The ITextStoreACP::SetText method replaces a text string in the document.

HRESULT SetText(
  DWORD dwFlags,
  LONG acpStart,
  LONG acpEnd,
  const WCHAR *pchText,
  ULONG cch,
  TS_TEXTCHANGE *pChange
);

Parameters

dwFlags
[in] TBD
acpStart
[in] Offset at the start of the run of text to replace.
acpEnd
[in] Offset at the end of the run of text to replace.
WCHAR pchText
[in] Text to replace the run with. Not NULL terminated.
cch
[in] Character count of pchText.
pChange
[out] Structure that receives offsets of modified text.

Return Values

S_OK
The method completed successfully.
TS_E_NOLOCK
The caller does not have a write lock.
TS_E_INVALIDPOS
The acpStart or acpEnd parameter is outside of the document text.
TS_E_READONLY
The document is read-only. Modifying the content is not permitted.
TS_E_REGION
An attempt was made to modify text across a region boundary.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACP::UnadviseSink

The ITextStoreACP::UnadviseSink method is called by the client to indicate that it no longer requires notifications from the server. The server should release the sink interface, and cease sending notifications on it.

HRESULT UnadviseSink(
  IUnknown *punk
);

Parameters

punk
[in] Pointer to a sink object. Must not be NULL.

Return Values

S_OK
The method completed successfully.
CONNECT_E_NOCONNECTION
The punk parameter is not an active sink.

Remarks

Every call to ITextStoreACP::AdviseSink which registers a new sink should be matched by a call to ITextStoreACP::UnadviseSink. Calls to ITextStoreACP::AdviseSink that only update the dwMask parameter of a sink which was previously registered, do not need matching calls to ITextStoreACP::UnadviseSink.

For example, a client could call ITextStoreACP::AdviseSink first to register a sink, then later call ITextStoreACP::AdviseSink with the same sink to change the dwMask parameter, and finally call ITextStoreACP::UnadviseSink once to unregister the sink.

The punk parameter must have the same COM identity as the pointer originally passed in ITextStoreACP::AdviseSink. Servers should not assume that it will have the same pointer value.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACPServices

The ITextStoreACPServices interface is implemented by Text Services Framework. You can serialize (arrange in a series) property header information for the application character position (ACP) based text data using this interface. Property header information is stored in the TF_PERSISTENT_PROPERTY_HEADER_ACP structure. You can also create a new TfRangeACP object, as well as force a property onto the text range using this interface.

Methods

ITextStoreACPServices methods | Description
Serialize | Serializes (arranges in a series) property header information for the ACP-based text data. Property header information is stored in the TF_PERSISTENT_PROPERTY_HEADER_ACP structure.
Unserialize | Unserializes property header information for the ACP-based text data.
ForceLoadProperty | Forces a property onto the ACP-based range of text data.
CreateRange | Creates a new range based on the acpStart and acpEnd parameters. The new ACP-based range object will start at acpStart and end at acpEnd.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITextStoreACPServices::CreateRange

The ITextStoreACPServices::CreateRange method creates a new range based on the acpStart and acpEnd parameters. The new ACP-based range object will start at acpStart and end at acpEnd.

HRESULT CreateRange(
  LONG acpStart,
  LONG acpEnd,
  ITfRangeACP **ppRange
);

Parameters

acpStart
[in] Starting position for the new range object.
acpEnd
[in] Ending position for the new range object.
ppRange
[out] The new ACP-based range object.

Return Values

This method returns the standard HRESULT values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITextStoreACPServices::ForceLoadProperty

The ITextStoreACPServices::ForceLoadProperty method forces a property onto the ACP-based range of text data.

HRESULT ForceLoadProperty(
  ITfProperty *pProp
);

Parameters

pProp
[in] The relevant property object.

Return Values

This method returns the standard HRESULT values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITextStoreACPServices::Serialize

The ITextStoreACPServices::Serialize method serializes (arranges in a series) property header information for the ACP-based text data. Property header information is stored in the TF_PERSISTENT_PROPERTY_HEADER_ACP structure.

HRESULT Serialize(
  ITfProperty *pProp,
  ITfRange *pRange,
  TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
  IStream *pStream
);

Parameters

pProp
[in] The relevant property object.
pRange
[in] The relevant range object.
pHdr
[out] Receives the property header information for the ACP based text data
pStream
[in] TBD

Return Values

This method returns the standard HRESULT values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

TF_PERSISTENT_PROPERTY_HEADER_ACP, ITextStoreACPServices::Unserialize


ITextStoreACPServices::Unserialize

The ITextStoreACPServices::Unserialize method removes the series order of the property header information for the ACP-based text data.

HRESULT Unserialize(
  ITfProperty *pProp,
  TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
  IStream *pStream,
  ITfPersistentPropertyLoaderACP *pLoader
);

Parameters

pProp
[in] The relevant property object.
pHdr
[in] The property header information for the ACP-based text data.
pStream
[in] TBD
pLoader
[in] TBD

Return Values

This method returns the standard HRESULT values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

TF_PERSISTENT_PROPERTY_HEADER_ACP, ITextStoreACPServices::Serialize


ITextStoreACPSink

The ITextStoreACPSink interface is implemented by clients to receive notifications when a changes to the text store occur. The application will receive an ITextStoreACPSink pointer from an AdviseSink call to objects supporting ITextStoreACP.

Methods

ITextStoreACPSink methods | Description
OnTextChange | Called when the text of the text stream changes.
OnSelectionChange | Called when the selection of the text stream changes. That is when the return value of a potential call to ITextStoreACP::GetSelection has changed.
OnLayoutChange | Called when the on-screen representation (the layout) of the text stream has changed.
OnStatusChange | Called when the status of the text stream changes.
OnAttrsChange | Called when the attributes of the text stream change.
OnLockGranted | Called when a lock is granted. Within the context of ITextStoreACPSink::OnLockGranted, clients may access or modify document contents.
OnStartEditTransaction | TBD
OnEndEditTransaction | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACPSink::OnAttrsChange

The ITextStoreACPSink::OnAttrsChange method is called when the attributes of the text stream change.

HRESULT OnAttrsChange(
  LONG acpStart,
  LONG acpEnd,
  ULONG cAttrs,
  const TS_ATTRID *paAttrs
);

Parameters

acpStart
[in] Start of the range
acpEnd
[in] End of the range
cAttrs
[in] TBD
paAttrs
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACPSink::OnEndEditTransaction

TBD

HRESULT OnEndEditTransaction(void);

Parameters

This method has no parameters.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACPSink::OnLayoutChange

The ITextStoreACPSink::OnLayoutChange method is called when the on-screen representation (the layout) of the text stream has changed.

HRESULT OnLayoutChange(
  TsLayoutCode lcode,
  TsViewCookie vcView
);

Parameters

lcode
[in] TBD
vcView
[in] Cookie that corresponds to the current document.

Return Values

S_OK
The method completed successfully.

Remarks

A call to ITextStoreACPSink::OnLayoutChange could be in response to a text edit, font size change, window movement, window resizing, or other layout change.

If a call to ITextStoreACP::GetTextExt or ITextStoreACP::GetACPFromPoint fails because the application did not calculate the screen layout (Return Value: TS_E_NOLAYOUT), the application must then call ITextStoreACPSink::OnLayoutChange when the data is ready.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACPSink::OnLockGranted

The ITextStoreACPSink::OnLockGranted method is called when a lock is granted. Within the context of ITextStoreACPSink::OnLockGranted, clients may access or modify document contents.

HRESULT OnLockGranted(
  DWORD dwLockFlags
);

Parameters

dwLockFlags
[in] A bit field that specifies the type of lock requested

Return Values

S_OK
The method completed successfully.

Remarks

The level of access granted, specified in the dwLockFlags parameter, should match the most aggressive client request to ITextStoreACP::RequestLock since the previous call to ITextStoreACPSink::OnLockGranted.

Calls to ITextStoreACP::RequestLock from within ITextStoreACPSink::OnLockGranted will return an error value. An error will also occur if the thread is yielded from within ITextStoreACPSink::OnLockGranted. Therefore, Win32 APIs that yield thread control such as SendMessage, GetMessage, and so on must not be used. PostMessage is an acceptable API call from within ITextStoreACPSink::OnLockGranted.

Applications must not call any of the ITextStoreACPSink methods from within the context of ITextStoreACPSink::OnLockGranted. Specifically, applications must not call ITextStoreACPSink::OnTextChange in response to ITextStoreACP::SetText as well as ITextStoreACPSink::OnSelectionChange in response to ITextStoreACP::SetSelection. The client making the changes is responsible for tracking these events.

The HRESULT returned by ITextStoreACPSink::OnLockGranted will be passed as an out parameter to ITextStoreACP::RequestLock, if the call occurs synchronously.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACPSink::OnSelectionChange

The ITextStoreACPSink::OnSelectionChange method is called when the selection of the text stream changes. That is when the return value of a potential call to ITextStoreACP::GetSelection has changed.

HRESULT OnSelectionChange(void);

Parameters

This method has no parameters.

Return Values

S_OK
The method completed successfully.

Remarks

Applications do not need to call ITextStoreACPSink::OnSelectionChange in response to the ITextStoreACP::SetSelection method. ITextStoreACPSink::OnSelectionChange only needs to be called when the application modifies the selection itself, not when a client modifies the selection with ITextStoreACP::SetSelection.

Applications should expect reentrant client calls to ITextStoreACP::RequestLock from within ITextStoreACPSink::OnSelectionChange. An application may grant the request synchronously or, because several changes have been cached, grant the lock asynchronously.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACPSink::OnStartEditTransaction

TBD

HRESULT OnStartEditTransaction(void);

Parameters

This method has no parameters.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACPSink::OnStatusChange

The ITextStoreACPSink::OnStatusChange method is called when the status of the text stream changes.

HRESULT OnStatusChange(
  DWORD dwFlags
);

Parameters

dwFlags
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreACPSink::OnTextChange

The ITextStoreACPSink::OnTextChange method is called when the text of the text stream changes.

HRESULT OnTextChange(
  DWORD dwFlags,
  const TS_TEXTCHANGE *pChange
);

Parameters

dwFlags
[in] TBD
pChange
[in] The application must fill this structure with offsets of the old and new extents of any modified text, including formatting data.

Return Values

S_OK
The method completed successfully.

Remarks

ITextStoreACPSink::OnTextChange is called when the application modifies its own text, but never when the client modifies text through the ITextStoreACP interface. Applications must call ITextStoreACPSink::OnTextChange when text changes within its stored document. ITextStoreACPSink::OnTextChange must not be called in response to ITextStoreACP::SetText or ITextStoreACP::InsertEmbedded.

Applications should expect reentrant client calls to ITextStoreACP::RequestLock from within ITextStoreACPSink::OnTextChange. An application may grant the request synchronously or, because several changes have been cached, grant the lock asynchronously.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor

The ITextStoreAnchor interface is implemented by applications, and enables access to a text store. Each document is exposed as a stream of Unicode characters, some of which might reference embedded content. This interface is implemented by an application or control and clients read or potentially modify the document content using this interface.

In the case of this interface, ITextStoreAnchor, text stores are exposed by using an anchor-based format. Text stores are also exposed using a character offset, or Application Character Position (ACP)-based format through the ITextStoreACP interface.

Methods

ITextStoreAnchor methods | Description
AdviseSink | Called by the client to find the sink interface on the server. The sink interface is specified by the punk parameter.
UnadviseSink | TBD
RequestLock | Grants a lock in order for clients to read or modify a document. The lock itself has the form of a call by the application to ITextStoreAnchorSink::OnLockGranted. Inside the scope of ITextStoreAnchorSink::OnLockGranted, the client may read or modify text.
GetStatus | Provides the status of the document in general.
QueryInsert | TBD
GetSelection | Returns the offsets of any selected text within the document.
SetSelection | Selects text within the document.
GetText | Copies a specified number of characters from the text stream.
SetText | Replaces a range of text in the document.
GetFormattedText | Returns formatted text information along a span of text.
GetEmbedded | Retrieves embedded content.
InsertEmbedded | Inserts the selected text object within a text stream.
RequestSupportedAttrs | TBD
RequestAttrsAtPosition | TBD
RequestAttrsTransitioningAtPosition | TBD
FindNextAttrTransition | TBD
RetrieveRequestedAttrs | TBD
GetStart | Returns an anchor positioned at the start of the document.
GetEnd | Returns an anchor positioned at the end of the document.
GetActiveView | Returns a cookie that specifies the current active view.
GetAnchorFromPoint | Converts a point in screen coordinates to an anchor positioned at a corresponding location.
GetTextExt | Returns the bounding box in screen coordinates of a range of text.
GetScreenExt | Returns the bounding box of the display surface upon which this text stream is rendered.
GetWnd | Returns an HWND corresponding to the current document, if one exists.
QueryInsertEmbedded | TBD
InsertTextAtSelection | TBD
InsertEmbeddedAtSelection | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::AdviseSink

The ITextStoreAnchor::AdviseSink method is called by the client to find the sink interface on the server. The sink interface is specified by the punk parameter.

HRESULT AdviseSink(
  REFIID riid,
  IUnknown *punk,
  DWORD dwMask
);

Parameters

riid
[in] Specifies the sink interface
punk
[in] Pointer to the sink interface. Must not be NULL.
dwMask
[in] Specifies which methods on the sink the server should call.

Return Values

S_OK
The method completed successfully.
CONNECT_E_ADVISELIMIT
A sink is installed.
E_INVALIDARG
Specified interface riid was unsupported.

Remarks

Subsequent calls with the same interface, represented by the punk parameter, are treated as requests to update the dwMask parameter. Servers should not call AddRef on the sink in response to such a request.

Servers should not assume that the punk parameter is IUnknown, and should use QueryInterface to get an IUnknown value for identity comparison purposes.

Servers will only maintain a single connection point. Attempts to advise a second sink will fail until the original sink is unadvised.

Clients should use ITextStoreAnchor::UnadviseSink to disconnect the sink object when notifications are no longer required.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.
Library: Included as a resource in Msctf.dll.

See Also

ITextStoreACP::UnadviseSink


ITextStoreAnchor::FindNextAttrTransition

TBD

HRESULT FindNextAttrTransition(
  IAnchor *paStart,
  IAnchor *paHalt,
  ULONG cFilterAttrs,
  const TS_ATTRID *paFilterAttrs,
  DWORD dwFlags,
  BOOL *pfFound,
  LONG *plFoundOffset
);

Parameters

paStart
[in] Anchor positioned at the start of a range.
paHalt
[in] Anchor positioned at the end of a range.
cFilterAttrs
[in] TBD
TS_ATTRID paFilterAttrs
[in] TBD
dwFlags
[in] TBD
pfFound
[out] TBD
plFoundOffset
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::GetActiveView

The ITextStoreAnchor::GetActiveView method returns a cookie that specifies the current active view.

HRESULT GetActiveView(
  TsViewCookie *pvcView
);

Parameters

pvcView
[out] Cookie that specifies the current active view.

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::GetAnchorFromPoint

The ITextStoreAnchor::GetAnchorFromPoint method converts a point in screen coordinates to an anchor positioned at a corresponding location.

HRESULT GetAnchorFromPoint(
  TsViewCookie vcView,
  const POINT *ptScreen,
  DWORD dwFlags,
  IAnchor **ppaSite
);

Parameters

vcView
[in] TBD
ptScreen
[in] A point in screen coordinates.
dwFlags
[in] A bit field specifying how to handle exceptional cases.
ppaSite
[out] Receives an anchor positioned at a location corresponding to ptScreen.

Return Values

S_OK
The method completed successfully.
TS_E_NOLAYOUT
The application has not calculated a text layout yet.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::GetEmbedded

The ITextStoreAnchor::GetEmbedded method retrieves embedded content.

HRESULT GetEmbedded(
  DWORD dwFlags,
  IAnchor *paPos,
  REFGUID rguidService,
  REFIID riid,
  IUnknown **ppunk
);

Parameters

dwFlags
[in] TBD
paPos
[in] An anchor positioned just before a TS_CHAR_EMBEDDED character.
rguidService
[in] Specifies how to retrieve the embedded content.
riid
[in] The interface to load into the ppunk out parameter.
ppunk
[out] The object interface pointer. It may be safely cast to match riid.

Return Values

S_OK
The method completed successfully.
E_NOTIMPL
The implementing application does not expose embedded objects in its stream.
TS_E_NOOBJECT
The acpPos parameter is not positioned before a TS_CHAR_EMBEDDED character.
TS_E_NOINTERFACE
The object does not support the requested interface.
TS_E_NOSERVICE
The content cannot be returned to match the service GUID.
TS_E_NOLOCK
The caller does not have a read lock.

Remarks

The start anchor of the range should be positioned immediately before the character of the caller's focus.

The rguidService parameter specifies how the object content should be referenced:

GUID_TSSERVICE_DATAOBJECT specifies that the caller requires a data transfer object it can use to retrieve the content. The riid parameter will be IDataObject, and the returned object will be treated like content from the OLE clipboard. This method should be used when a copy of the content is required.

GUID_TSSERVICE_ACCESSIBLE specifies that the caller requires an accessibility object.

GUID_TSSERVICE_ACTIVEX specifies that the caller requires a direct pointer to the object, using the interface specified by the riid parameter.

There are no guarantees which interfaces the object will support. The caller must use QueryInterface to probe for appropriate interfaces. Likely interfaces include those associated with embedded documents or controls such as IOleObject, IDataObject, IViewObject, IPersistStorage, IOleCache, or IDispatch.

The ppunk parameter may be set to NULL on exit even though *pdcrResult == TS_OK. The application is exposing the presence of an embedded object, but not the object itself. TSF Text Services benefit by knowing about the potential word break.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::GetEnd

The ITextStoreAnchor::GetEnd method returns an anchor positioned at the end of the document.

HRESULT GetEnd(
  IAnchor **ppaEnd
);

Parameters

ppaEnd
[out] Receives an anchor positioned at the very end of text the stream.

Return Values

S_OK
The method completed successfully.
E_NOTIMPL
The application has not implemented this method. This is usually an indication that calculating the end position requires excessive resources. If the end position is necessary, use ITextStoreAnchor::GetText to calculate it.
TS_E_NOLOCK
The caller does not have a read lock.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::GetFormattedText

The ITextStoreAnchor::GetFormattedText method returns formatted text information along a span of text.

HRESULT GetFormattedText(
  IAnchor *paStart,
  IAnchor *paEnd,
  IDataObject **ppDataObject
);

Parameters

paStart
[in] Anchor position at which to start.
paEnd
[in] Anchor position at which to end.
ppDataObject
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::GetScreenExt

The ITextStoreAnchor::GetScreenExt method returns the bounding box of the display surface upon which this text stream is rendered.

HRESULT GetScreenExt(
  TsViewCookie vcView,
  RECT *prc
);

Parameters

vcView
[in] A cookie that specifies the display surface.
prc
[out] Receives the bounding box, in screen coordinates, of the display surface of the document.

Return Values

S_OK
The method completed successfully.

Remarks

If the text is not currently displayed, for example if the document window is minimized, prc will be set to { 0, 0, 0, 0 }.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::GetSelection

The ITextStoreAnchor::GetSelection method returns the offsets of any selected text within the document.

HRESULT GetSelection(
  ULONG ulIndex,
  ULONG ulCount,
  TS_SELECTION_ANCHOR *pSelection,
  ULONG *pcFetched
);

Parameters

ulIndex
[in] Specifies with which selection to start the process. May be any non-zero value, or TS_DEFAULT_SELECTION to specify the default selection index.
ulCount
[in] The maximum number of selections to return
pSelection
[out] An array of ulCount TS_SELECTION_ANCHOR structures.
pcFetched
[out] The number of structures in pSelection actually returned.

Return Values

S_OK
The method completed successfully.
TS_E_NOSELECTION
The document has no selection.
TS_E_NOLOCK
The caller does not have a read or write lock.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::GetStart

The ITextStoreAnchor::GetStart method returns an anchor positioned at the start of the document.

HRESULT GetStart(
  IAnchor **ppaStart
);

Parameters

ppaStart
[out] Anchor positioned at the start of the range.

Return Values

S_OK
The method completed successfully.
TS_E_NOLOCK
The caller does not have a read lock.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::GetStatus

The ITextStoreAnchor::GetStatus method provides the status of the document in general.

HRESULT GetStatus(
  TS_STATUS *pdcs
);

Parameters

pdcs
[out] Value from the TS_STATUS structure that specifies the state of the document in general. Must not be NULL.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.
Library: Included as a resource in Msctf.dll.

See Also

TS_STATUS


ITextStoreAnchor::GetText

The ITextStoreAnchor::GetText method copies a specified number of characters from the text stream.

HRESULT GetText(
  DWORD dwFlags
  IAnchor *paStart,
  IAnchor *paEnd,
  WCHAR *pchText,
  ULONG cchReq,
  ULONG *pcch,
  BOOL fUpdateAnchor
);

Parameters

dwFlags
[in] TBD
paStart
[in] Anchor positioned at the location where the reading will start.
paEnd
[in] Anchor positioned at the location where the reading will stop. Ignored if value is NULL.
pchText
[out] Buffer to receive text.
cchReq
[in] Buffer size in characters.
pcch
[out] Count of characters copied into the buffer.
fUpdateAnchor
[in] If TRUE, paStart will be repositioned just past the last character copied to pchText.

Return Values

S_OK
The method completed successfully.
TS_E_NOLOCK
The caller does not have a read lock.

Remarks

The actual number of characters copied could be less than cchReq if the number of characters between paStart and paEnd are less than cchReq.

If paEnd is NULL, it will be as if it were an anchor positioned at the end of the stream.

If fUpdateAnchor is set TRUE, paStart will be repositioned just past the last character copied into pchText. A caller would use this to quickly scan text with multiple GetText calls.

The pchText parameter may be NULL only when cchReq is zero. Callers must hold a read locked obtained through ITextStore::RequestLock; otherwise, ITextStoreAnchor::GetText will fail with TS_E_NOLOCK.

The behavior of GetText is not affected by any region boundaries covered by the returned text.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::GetTextExt

The ITextStoreAnchor::GetTextExt method returns the bounding box in screen coordinates of a range of text.

HRESULT GetTextExt(
  TsViewCookie vcView,
  IAnchor *paStart,
  IAnchor *paEnd,
  RECT *prc,
  BOOL *pfClipped
);

Parameters

vcView
[in] TBD
paStart
[in] Anchor positioned at the start of the range.
paEnd
[in] Anchor positioned at the end of the range.
prc
[out] Receives the bounding box of the text range in screen coordinates.
pfClipped
[out] Specifies whether or not prc has been clipped.

Return Values

S_OK
The method completed successfully.
TS_E_NOLAYOUT
The application has not calculated a text layout yet.

Remarks

If pfClipped is set TRUE, then prc does not include the entire text range requested. The bounding box has been clipped because some of the requested range is not visible.

If the method call fails with return code TS_E_NOLAYOUT, any further calls will not succeed until the applications calls ITextStoreSink::OnLayoutChange.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::GetWnd

The ITextStoreAnchor::GetWnd method returns an HWND corresponding to the current document, if one exists.

HRESULT GetWnd(
  TsViewCookie vcView,
  HWND *phwnd
);

Parameters

vcView
[in] A cookie that corresponds to the current document.
phwnd
[out] Receives an HWND corresponding to the current document, which may be NULL if the document does not have a corresponding HWND or does not know of its corresponding HWND.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::InsertEmbedded

The ITextStoreAnchor::InsertEmbedded method inserts the selected text object within a text stream.

HRESULT InsertEmbedded(
  DWORD dwFlags,
  IAnchor *paStart,
  IAnchor *paEnd,
  IDataObject *pDataObject
);

Parameters

dwFlags
[in] TBD
paStart
[in] Anchor positioned at the start of the range.
paEnd
[in] Anchor positioned at the end of the range.
pDataObject
[in] TBD

Return Values

S_OK
The method completed successfully.
TS_E_NOLAYOUT
The application has not calculated a text layout yet.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::InsertEmbeddedAtSelection

TBD

HRESULT InsertEmbeddedAtSelection(
  DWORD dwFlags,
  IDataObject* pDataObject,
  IAnchor** ppaStart,
  IAnchor** ppaEnd
);

Parameters

dwFlags
[in] TBD
pDataObject
[in] TBD
ppaStart
[out] TBD
ppaEnd
[out] TBD

Return Values

TBD

Remarks

TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::InsertTextAtSelection

TBD

HRESULT InsertTextAtSelection(
  DWORD dwFlags,
  const WCHAR *pchText,
  ULONG cch,
  IAnchor **ppaStart,
  IAnchor **ppaEnd
);

Parameters

dwFlags
[in] TBD
pchText
[in] TBD
cch
[in] TBD
ppaStart
[out] TBD
ppaEnd
[out] TBD

Return Values

TBD

Remarks

TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::QueryInsert

TBD

HRESULT QueryInsert(
  IAnchor *paTestStart,
  IAnchor *paTestEnd,
  ULONG cch,
  IAnchor **ppaResultStart,
  IAnchor **ppaResultEnd
);

Parameters

paTestStart
[in] TBD
paTestEnd
[in] TBD
cch
[in] TBD
ppaResultStart
[out] TBD
ppaResultEnd
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::QueryInsertEmbedded

TBD

HRESULT QueryInsertEmbedded(
  const GUID* pguidService,
  const FORMATETC *pFormatEtc,
  BOOL* pfInsertable
);

Parameters

pguidService
[in] TBD
pFormatEtc
[in] TBD
pfInsertable
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::RequestAttrsAtPosition

TBD

HRESULT RequestAttrsAtPosition(
  IAnchor *paPos,
  ULONG cFilterAttrs,
  const TS_ATTRID *paFilterAttrs,
  DWORD dwFlags
);

Parameters

paPos
[in] TBD
cFilterAttrs
[in] TBD
paFilterAttrs
[in] TBD
dwFlags
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::RequestAttrsTransitioningAtPosition

TBD

HRESULT RequestAttrsTransitioningAtPosition(
  IAnchor *paPos,
  ULONG cFilterAttrs,
  const TS_ATTRID *paFilterAttrs,
  DWORD dwFlags
);

Parameters

paPos
[in] TBD
cFilterAttrs
[in] TBD
paFilterAttrs
[in] TBD
dwFlags
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::RequestLock

The ITextStoreAnchor::RequestLock method grants a lock in order for clients to read or modify a document. The lock itself has the form of a call by the application to ITextStoreAnchorSink::OnLockGranted. Inside the scope of ITextStoreAnchorSink::OnLockGranted, the client may read or modify text.

HRESULT RequestLock(
  DWORD dwLockFlags,
  HRESULT *phrSession
);

Parameters

dwLockFlags
[in] Specifies the type of lock requested.
phrSession
[out] Receives an HRESULT specifying the result of the request. Receives an HRESULT specifying the result of the request. TS_S_ASYNC signifies that ITextStoreAnchorSink::OnLockGranted will be called back asynchronously. TS_E_SYNCHRONOUS signifies that the synchronous request was not granted. Any other value signifies that a lock was granted synchronously. This is the value returned by ITextStoreAnchorSink::OnLockGranted.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::RequestSupportedAttrs

TBD

HRESULT RequestSupportedAttrs(
  DWORD dwFlags,
  ULONG cFilterAttrs,
  const TS_ATTRID *paFilterAttrs
);

Parameters

dwFlags
[in] TBD
cFilterAttrs
[in] TBD
paFilterAttrs
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::RetrieveRequestedAttrs

TBD

HRESULT RetrieveRequestedAttrs(
  ULONG ulCount,
  TS_ATTRVAL *paAttrVals,
  ULONG *pcFetched
);

Parameters

ulCount
[in] TBD
paAttrVals
[out] TBD
pcFetched
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::SetSelection

The ITextStoreAnchor::SetSelection method selects text within the document.

HRESULT SetSelection(
  ULONG ulCount,
  const TS_SELECTION_ANCHOR *pSelection
);

Parameters

ulCount
[in] Number of selection runs in pSelection.
pSelection
[in] An array of TS_SELECTION_ANCHOR structures.

Return Values

S_OK
The method completed successfully.
TS_E_NOLOCK
The caller does not have a write lock.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::SetText

The ITextStoreAnchor::SetText method replaces a range of text in the document.

HRESULT SetText(
  DWORD dwFlags,
  IAnchor *paStart,
  IAnchor *paEnd,
  const WCHAR *pchText,
  ULONG cch
);

Parameters

dwFlags
[in] TBD
paStart
[in] Anchor positioned at the start of the run of text to replace.
paEnd
[in] Anchor positioned at the end of the run of text to replace.
pchText
[in] Text to replace the run with. Not NULL terminated.
cch
[in] Character count of pchText.

Return Values

S_OK
The method completed successfully.
TS_E_NOLOCK
The caller does not have a write lock.

Remarks

The paStart and paEnd parameters specify the range of text to replace. The paStart parameter should always be at the same position or behind paEnd. If paStart is at the same position as paEnd, then the operation is an insertion and no existing text will be removed.

Callers must hold a write locked obtained through ITextStore::RequestLock. Otherwise, ITextStoreAnchor::SetText will fail with TS_E_NOLOCK.

TS_CHAR_EMBEDDED may not be passed into ITextStoreAnchor::SetText. Use ITextStoreAnchor::InsertEmbedded instead.

ITextStoreAnchor::SetText will fail if the span of text replaced covers any region boundary. Instead, callers should make multiple calls to ITextStoreAnchor::SetText, one for each region.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchor::UnadviseSink

TBD

HRESULT UnadviseSink(
  IUnknown *punk
);

Parameters

punk
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchorServices

The ITextStoreAnchorServices interface is implemented by Text Services Framework. You can serialize (arrange in a series) property header information for the anchor-based text data using this interface. Property header information is stored in the TF_PERSISTENT_PROPERTY_HEADER_ANCHOR structure. You can also create a new TfRangeAnchor object, as well as force a property onto the text range using this interface.

Methods

ITextStoreAnchorServices methods | Description
Serialize | Serializes (arranges in a series) property header information for the anchor based text data. Property header information is stored in the TF_PERSISTENT_PROPERTY_HEADER_ANCHOR structure.
Unserialize | Unserializes property header information for the anchor-based text data.
ForceLoadProperty | Forces a property onto the anchor based range of text data.
CreateRange | Creates a new range based on the acpStart and acpEnd parameters. The new anchor based range object will start at acpStart and end at acpEnd.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITextStoreAnchorServices::CreateRange

The ITextStoreAnchorServices::CreateRange method creates a new range based on the paStart and paEnd parameters. The new anchor based range object will start at paStart and end at paEnd.

HRESULT CreateRange(
  IAnchor *paStart,
  IAnchor *paEnd,
  ITfRangeAnchor **ppRange
);

Parameters

paStart
[in] The starting position for the new range object.
paEnd
[in] The ending position for the new range object.
ppRange
[out] The new anchor-based range object.

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITextStoreAnchorServices::ForceLoadProperty

The ITextStoreAnchorServices::ForceLoadProperty method forces a property onto the anchor-based range of text data.

HRESULT ForceLoadProperty(
  ITfProperty *pProp
);

Parameters

pProp
[in] The relevant property object.

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITextStoreAnchorServices::Serialize

The ITextStoreAnchorServices::Serialize method serializes (arranges in a series) property header information for the anchor based text data. Property header information is stored in the TF_PERSISTENT_PROPERTY_HEADER_ANCHOR structure.

HRESULT Serialize(
  ITfProperty *pProp,
  ITfRange *pRange,
  TF_PERSISTENT_PROPERTY_HEADER_ANCHOR *pHdr,
  IStream *pStream
);

Parameters

pProp
[in] The relevant property object.
pRange
[in] The relevant range object.
pHdr
[out] Receives the property header information for the anchor-based text data.
pStream
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

TF_PERSISTENT_PROPERTY_HEADER_ANCHOR, ITextStoreAnchorServices::Unserialize


ITextStoreAnchorServices::Unserialize

The ITextStoreAnchorServices::Unserialize method removes the series ordering of the property header information for the anchor-based text data.

HRESULT Unserialize(
  ITfProperty *pProp,
  TF_PERSISTENT_PROPERTY_HEADER_ANCHOR *pHdr,
  IStream *pStream,
  ITfPersistentPropertyLoaderAnchor *pLoader
);

Parameters

pProp
[in] The relevant property object.
pHdr
[in] The property header information for the anchor-based text data.
pStream
[in] TBD
pLoader
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

TF_PERSISTENT_PROPERTY_HEADER_ANCHOR, ITextStoreAnchorServices::Serialize


ITextStoreAnchorSink

The ITextStoreAnchorSink interface is implemented by clients to receive notifications when a changes to the text store occur. The application will receive an ITextStoreAnchorSink pointer from an AdviseSink call to objects supporting ITextStoreAnchor.

Methods

ITextStoreAnchorSink methods | Description
OnTextChange | Called when text in the text stream changes.
OnSelectionChange | Called when the selection of the text stream changes. That is when the return value of a potential call to ITextStoreAnchor::GetSelection has changed.
OnLayoutChange | Called when the on-screen representation of the text stream has changed.
OnStatusChange | Called when the status of the text stream changes.
OnAttrsChange | Called when the attributes of the text stream change.
OnLockGranted | Called by an application in response to one or more client calls to ITextStoreAnchor::RequestLock. Within the context of ITextStoreAnchorSink::OnLockGranted, clients may access or modify document contents.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchorSink::OnAttrsChange

The ITextStoreAnchorSink::OnAttrsChange method is called when the attributes of the text stream change.

HRESULT OnAttrsChange(
  IAnchor *paStart,
  IAnchor *paEnd,
  ULONG cAttrs,
  const TS_ATTRID *paAttrs
);

Parameters

paStart
[in] The start of the range.
paEnd
[in] The end of the range.
cAttrs
[in] TBD
paAttrs
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchorSink::OnEndEditTransaction

TBD

HRESULT OnEndEditTransaction(void);

Parameters

This method has no parameters.

Return Values

TBD

Remarks

TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchorSink::OnLayoutChange

The ITextStoreAnchorSink::OnLayoutChange method is called when the on-screen representation of the text stream has changed.

HRESULT OnLayoutChange(
  TsLayoutCode lcode,
  TsViewCookie vcView
);

Parameters

lcode
[in] TBD
vcView
[in] A cookie corresponding to the current document.

Return Values

S_OK
The method completed successfully.

Remarks

A call to ITextStoreAnchorSink::OnLayoutChange could be in response to a text edit, font size change, window movement, window resizing, or other layout change.

If a call to ITextStoreAnchor::GetTextExt or ITextStoreAnchor::GetAnchorFromPoint fails because the application did not calculate the screen layout (Return Value: TS_E_NOLAYOUT), the application must then call ITextStoreAnchorSink::OnLayoutChange when the information is ready.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchorSink::OnLockGranted

The ITextStoreAnchorSink::OnLockGranted method is called by an application in response to one or more client calls to ITextStoreAnchor::RequestLock. Within the context of OnLockGranted, clients may access or modify document contents.

HRESULT OnLockGranted(
  DWORD dwLockFlags
);

Parameters

dwLockFlags
[in] A bit field that specifies the type of lock requested.

Return Values

S_OK
The method completed successfully.

Remarks

The level of access granted, specified in the dwLockFlags parameter, should match the most aggressive client request to ITextStoreAnchor::RequestLock since the previous call to ITextStoreAnchorSink::OnLockGranted.

Calls to ITextStoreAnchor::RequestLock from within ITextStoreAnchorSink::OnLockGranted will return an error value. An error will also occur if the thread is yielded from within ITextStoreAnchorSink::OnLockGranted. Therefore, Win32 APIs that yield thread control such as SendMessage, GetMessage, and so on must not be used. PostMessage is an acceptable API call from within ITextStoreAnchorSink::OnLockGranted.

Applications must not call any of the ITextStoreAnchorSink methods from within the context of ITextStoreAnchorSink::OnLockGranted. Specifically, applications must not call ITextStoreAnchorSink::OnTextChange in response to ITextStoreAnchor::SetText as well as ITextStoreAnchorSink::OnSelectionChange in response to ITextStoreAnchor::SetSelection. The client making the changes is responsible for tracking these events.

The HRESULT returned by ITextStoreAnchorSink::OnLockGranted will be passed as an out parameter to ITextStoreAnchor::RequestLock, if the call occurs synchronously.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchorSink::OnSelectionChange

The ITextStoreAnchorSink::OnSelectionChange method is called when the selection of the text stream changes. That is when the return value of a potential call to ITextStoreAnchor::GetSelection has changed.

HRESULT OnSelectionChange(void);

Parameters

This method has no parameters.

Return Values

S_OK
The method completed successfully.

Remarks

Applications do not need to call ITextStoreAnchorSink::OnSelectionChange in response to the ITextStoreAnchor::SetSelection method. ITextStoreAnchorSink::OnSelectionChange only needs to be called when the application modifies the selection itself, not when a client modifies the selection with ITextStoreAnchor::SetSelection.

Applications should expect reentrant client calls to ITextStoreAnchor::RequestLock from within ITextStoreAnchorSink::OnSelectionChange. An application may grant the request synchronously or, because several changes have been cached, grant the lock asynchronously.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchorSink::OnStartEditTransaction

TBD

HRESULT OnStartEditTransaction(void);

Parameters

This method has no parameters.

Return Values

TBD

Remarks

TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchorSink::OnStatusChange

The ITextStoreAnchorSink::OnStatusChange method is called when the status of the text stream changes.

HRESULT OnStatusChange(
  DWORD dwFlags
);

Parameters

dwFlags
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITextStoreAnchorSink::OnTextChange

The ITextStoreAnchorSink::OnTextChange method is called when text in the text stream changes.

HRESULT OnTextChange(
  DWORD dwFlags,
  IAnchor *paStart,
  IAnchor *paEnd
);

Parameters

dwFlags
[in] TBD
paStart
[in] An anchor positioned at the start of a span of invalidated text.
paEnd
[in] An anchor positioned at the end of a span of invalidated text.

Return Values

S_OK
The method completed successfully.

Remarks

ITextStoreAnchorSink::OnTextChange is called when the application modifies its own text, but never when the client modifies text through the ITextStoreAnchor interface. Applications must call ITextStoreAnchorSink::OnTextChange when text changes within its stored document. ITextStoreAnchorSink::OnTextChange must not be called in response to ITextStoreAnchor::SetText or ITextStoreAchor::InsertEmbedded.

Applications should expect reentrant client calls to ITextStoreAnchor::RequestLock from within ITextStoreAnchorSink::OnTextChange. An application may grant the request synchronously or, because several changes have been cached, grant the lock asynchronously.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


ITfActiveLanguageProfileNotifySink

The ITfActiveLanguageProfileNotifySink interface is implemented by an application.

Methods in Vtable Order

ITfActiveLanguageProfileNotifySink methods | Description
OnActivated | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfActiveLanguageProfileNotifySink::OnActivated

TBD

HRESULT OnActivated(
  REFCLSID clsid,
  REFGUID guidProfile,
  BOOL fActivated
);

Parameters

clsid
[in] TBD
guidProfile
[in] TBD
fActivated
[in] TBD

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfActiveLanguageProfileNotifySink


ITfCandidateList

The ITfCandidateList interface is implemented by TSF Text Services and enables reading or enumerating string candidate objects. Individual candidate strings are accessed through the ITfCandidateString interface, implemented by TSF Text Services.

Methods

ITfCandidateList methods | Description
EnumCandidates | Returns an ITfEnumCandidates interface pointer.
GetCandidate | Gets a candidate string.
GetCandidateNum | Gets the number of the candidate string.
SetResult | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfCandidateList::EnumCandidates

The ITfCandidateList::EnumCandidates method returns an ITfEnumCandidates interface pointer.

HRESULT EnumCandidates(
  IEnumTfCandidates **ppEnum
);

Parameters

ppEnum
[out] On exit, contains ITfEnumCandidates interface pointer.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfCandidateList::GetCandidate

The ITfCandidateList::GetCandidate method gets a candidate string.

HRESULT GetCandidate(
  ULONG nIndex,
  ITfCandidateString **ppCand
);

Parameters

nIndex
[in] The index to the candidate string.
ppCand
[out] On exit, contains the pointer to ITfCandidateString interface for nIndex.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfCandidateList::GetCandidateNum

The ITfCandidateList::GetCandidateNum method gets the number of the candidate string.

HRESULT GetCandidateNum(
  ULONG *pnCnt
);

Parameters

pnCnt
[out] Pointer to the number of the candidate string.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfCandidateList::SetResult

The ITfCandidateList::SetResult method finalizes, changes selection, or cancels the candidate list.

HRESULT SetResult(
  ULONG nIndex,
  TfCandidateResult imcr
);

Parameters

nIndex
[in] The index number of the candidate string.
imcr
[in] The action to the candidate string specified by nIndex.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfCandidateString

The ITfCandidateString interface is implemented by TSF Text Services. This interface allows you to retrieve a single candidate string.

Methods

ITfCandidateString methods | Description
GetString | TBD
GetIndex | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfCandidateString::GetIndex

The ITfCandidateString::GetIndex method retreives the index of this CandidateString object.

HRESULT GetIndex(
  ULONG *pnIndex
);

Parameters

pnIndex
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfCandidateString::GetString

The ITfCandidateString::GetString method retreives the string of this CandidateString object.

HRESULT GetString(
  BSTR *pbstr
);

Parameters

pbstr
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfCategoryMgr

The ITfCategoryMgr interface is implemented by Text Services Framework, and you can manage categories with this interface. For example by enumerating, registering, or unregistering categories.

Text Services Framework categories are meant to help with the organization of GUIDs. Most objects of Text Services Framework are identified by GUID. For example, a TSF Text Service itself is identified by its CLSID. Text Services Framework properties, the Text Services Framework compartment, and display attribute information are each identified by GUIDs. To organize these GUIDs, Text Services Framework Categories are useful in that they group GUIDs. Text Services Framework or a TSF Text Service may create category GUIDs (CATID) to group those objects and make them more easily manageable.

Methods

ITfCategoryMgr methods | Description
RegisterCategory | Adds the category specified in the rcatid parameter.
UnregisterCategory | Removes the category specified in rcatid.
EnumCategoriesInItem | Obtains the new EnumGUID object that enumerates all categories of which the rguid belongs.
EnumItemsInCategory | Obtains the new EnumGUID object that enumerates all categorized GUIDs by the rcatid.
FindClosestCategory | Finds the catid closest to rguid in the CATID list of pcatidList. If this method could not find the closest one in the list, pcatid contains GUID_NULL.
RegisterGUIDDescription | Contains the description string for the new GUID.
UnregisterGUIDDescription | TBD
GetGUIDDescription | Obtains the string description of the GUID.
RegisterGUIDDWORD | TBD
UnregisterGUIDDWORD | TBD
GetGUIDDWORD | TBD
RegisterGUID | Obtains a new GUIDATOM pointer to the GUID.
GetGUID | Gets a GUID.
IsEqualTfGuidAtom | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCategoryMgr::EnumCategoriesInItem

The ITfCategoryMgr::EnumCategoriesInItem method obtains the new EnumGUID object that enumerates all categories of which the rguid belongs.

HRESULT EnumCategoriesInItem(
  REFGUID rguid,
  IEnumGUID **ppEnum
);

Parameters

rguid
[in] The target GUID for the category enumeration.
ppEnum
[out] On exit, contains the new EnumGUID object that enumerates all categories that the rguid belongs to.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCategoryMgr::EnumItemsInCategory

The ITfCategoryMgr::EnumItemsInCategory method obtains the new EnumGUID object that enumerates all categorized GUIDs by the rcatid.

HRESULT EnumItemsInCategory(
  REFGUID rcatid,
  IEnumGUID **ppEnum
);

Parameters

rcatid
[in] The CATID of the category.
ppEnum
[out] On exit, contains the new EnumGUID object that enumerates all categorized GUIDs by the rcatid.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCategoryMgr::FindClosestCategory

The ITfCategoryMgr::FindClosestCategory method finds the CATID closest to rguid in the CATID list of ppcatidList. If this method could not find the closest one in the list, pcatid contains GUID_NULL.

HRESULT FindClosestCategory(
  REFGUID rguid,
  GUID *pcatid,
  const GUID **ppcatidList,
  ULONG ulCount
);

Parameters

rguid
[in] The source GUID.
pcatid
[out] On exit, contains a CATID close to rguid.
ppcatidList
[in] The array of CATIDs.
ulCount
[in] The count of pcatidList.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCategoryMgr::GetGUID

The ITfCategoryMgr::GetGUID method gets a GUID.

HRESULT GetGUID(
  TfGuidAtom guidatom,
  GUID *pguid
);

Parameters

guidatom
[in] The target GUIDATOM.
pguid
[out] On exit, contains the GUID value pointed by guidatom.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCategoryMgr::GetGUIDDescription

The ITfCategoryMgr::GetGUIDDescription method obtains the string description of the GUID.

HRESULT GetGUIDDescription(
  REFGUID rguid,
  BSTR *pbstrDesc
);

Parameters

rguid
[in] The GUID to register into GUIDATOM.
pbstrDesc
[out] String containing the description.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCategoryMgr::GetGUIDDWORD

The ITfCategoryMgr::GetGUIDDWORD method obtains the DWORD value related to the GUID.

HRESULT GetGUIDDWORD(
  REFGUID rguid,
  DWORD *pdw
);

Parameters

rguid
[in] GUID value.
pdw
[out] DWORD value related to the GUID.

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCategoryMgr::IsEqualTfGuidAtom

TBD

HRESULT IsEqualTfGuidAtom(
  TfGuidAtom guidatom,
  REFGUID rguid,
  BOOL *pfEqual
);

Parameters

guidatom
[in] TBD
rguid
[in] TBD
pfEqual
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCategoryMgr::RegisterCategory

The ITfCategoryMgr::RegisterCategory method adds the category specified in the rcatid parameter.

HRESULT RegisterCategory(
  REFCLSID rclsid,
  REFGUID rcatid,
  REFGUID rguid
);

Parameters

rclsid
[in] TBD
rcatid
[in] CATID of the category.
rguid
[in] GUID to be added into the category specified by rcatid.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCategoryMgr::RegisterGUID

The ITfCategoryMgr::RegisterGUID method obtains a new GUIDATOM pointer to the GUID.

HRESULT RegisterGUID(
  REFGUID rguid,
  TfGuidAtom *pguidatom
);

Parameters

rguid
[in] The GUID to register into GUIDATOM.
pguidatom
[out] On exit, contains the new GUIDATOM to point to the GUID.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCategoryMgr::RegisterGUIDDescription

The ITfCategoryMgr::RegisterGUIDDescription method contains the description string for the new GUID.

HRESULT RegisterGUIDDescription(
  REFCLSID rclsid,
  REFGUID rguid,
  const WCHAR *pchDesc,
  ULONG cch
);

Parameters

rclsid
[in] TBD
rguid
[in] The GUID to register into GUIDATOM.
pchDesc
[in] The description string for the new GUID.
cch
[in] TBD

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCategoryMgr::RegisterGUIDDWORD

TBD

HRESULT RegisterGUIDDWORD(
  REFCLSID rclsid,
  REFGUID rguid,
  DWORD dw
);

Parameters

rclsid
[in] TBD
rguid
[in] TBD
dw
[in] TBD

Return Values

This method has no return value.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCategoryMgr::UnregisterCategory

The ITfCategoryMgr::UnregisterCategory method removes the category specified in rcatid.

HRESULT UnregisterCategory(
  REFCLSID rclsid,
  REFGUID rcatid,
  REFGUID rguid
);

Parameters

rclsid
[in] TBD
rcatid
[in] CATID of the category.
rguid
[in] GUID to be removed from the category that is specified by rcatid.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCategoryMgr::UnregisterGUIDDescription

TBD

HRESULT UnregisterGUIDDescription(
  REFCLSID rclsid,
  REFGUID rguid
);

Parameters

rclsid
[in] TBD
rguid
[in] TBD

Return Values

This method has no return value.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCategoryMgr::UnregisterGUIDDWORD

TBD

HRESULT UnregisterGUIDDWORD(
  REFCLSID rclsid,
  REFGUID rguid
);

Parameters

rclsid
[in] TBD
rguid
[in] TBD

Return Values

This method has no return value.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCleanupContextDurationSink

The ITfCleanupContextDurationSink interface is implemented by a TSF Text Service.

Methods in Vtable Order

ITfCleanupContextDurationSink methods | Description
OnStartCleanupContext | TBD
OnEndCleanupContext | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCleanupContextDurationSink::OnEndCleanupContext

The ITfCleanupContextDurationSink::OnEndCleanupContext method implemented by the TSF Text Services is called just after the TSF Framework finishes making the ITfCleanupContextSink::OnCleanupContext callbacks.

HRESULT OnEndCleanupContext(void);

Parameters

This method has no parameters.

Return Values

S_OK
The method returned successfully.

Remarks

This method is useful because typically TSF Text Services will want to avoid any context initialization for the duration of any cleanup callbacks. TSF Text Services are guaranteed a future callback to ITfTextInputProcessor::Activate if the Text Services are being shut down or ITfActiveLanguageProfileNotifySink::OnActivated if the active assembly is changing and the active assemblies are members of both the old and new assembly. In either case, a TSF Text Service will have a later opportunity to initialize or re-initialize any existing contexts.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfCleanupContextDurationSink


ITfCleanupContextDurationSink::OnStartCleanupContext

The ITfCleanupContextDurationSink::OnStartCleanupContext method implemented by TSF Text Services is called just before the TSF Text Services begins making ITfCleanupContextSink::OnCleanupContext callbacks. Because the OnCleanupContext callbacks supplies a write lock, the process of receiving locks and making callbacks happens asynchronously as the context owner grants locks for each context that has cleanup sinks.

HRESULT OnStartCleanupContext(void);

Parameters

This method has no parameters.

Return Values

S_OK
The method returned successfully.

Remarks

This method is useful because typically TSF Text Services will want to avoid any context initialization for the duration of any cleanup callbacks. TSF Text Services are guaranteed a future callback to ITfTextInputProcessor::Activate if the Text Services are being shut down or ITfActiveLanguageProfileNotifySink::OnActivated if the active assembly is changing and the active assemblies are members of both the old and new assembly. In either case, a TSF Text Service will have a later opportunity to initialize or re-initialize any existing contexts.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfCleanupContextDurationSink


ITfCleanupContextSink

The ITfCleanupContextSink interface is implemented by a TSF Text Service.

Methods in Vtable Order

ITfCleanupContextSink methods | Description
OnCleanupContext | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCleanupContextSink::OnCleanupContext

The ITfCleanupContextSink::OnCleanupContext method implemented by TSF Text services is called by the TSF Framework when the active assembly changes or when the TSF Framework is shut down on a thread with a final call to the ITfThreadMgr::Deactivate method. Use this method for a final modification of text or properties associated with a context.

HRESULT OnCleanupContext(
  TfEditCookie ecWrite,
  ITfContext* pic
);

Parameters

ecWrite
[in] Edit cookie with write access.
pic
[in] Context in which to uninitialized private data.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfCleanupContextSink


ITfClientId

The ITfClientId interface is implemented by Text Services Framework (TSF).

Methods in Vtable Order

ITfClientId methods | Description
GetClientId | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfClientId::GetClientId

TBD

HRESULT GetClientId(
  REFCLSID rclsid,
  TfClientId* ptid
);

Parameters

rclsid
[in] TBD
ptid
[out] TBD

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfClientId


ITfCompartment

The ITfCompartment interface is implemented by TSF. TSF Applications and TSF Text Services can set and get the actual data from a Text Services Framework compartment using this interface.

Some of the Text Services Framework objects enable an application or TSF Text Services to share static data between objects. A Text Services Framework compartment provides the data storage and notification mechanism for this data sharing. Each compartment is identified by a GUID, and can be made public and shared through publishing of the GUID. Using the GUID, anyone can get to the compartment object and make a modification.

All compartments are managed with the ITfCompartmentMgr interface.

Methods

ITfCompartment methods | Description
SetValue | Sets the value of the data in the compartment.
GetValue | Gets the data of the compartment.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCompartment::GetValue

The ITfCompartment::GetValue method gets the data of the compartment.

HRESULT GetValue(
  VARIANT *pvarValue
);

Parameters

pvarValue
[out] Value to get.

Return Values

S_OK
The method completed successfully.

Remarks

The caller must initialize the type member of TFPROPERTY structure. If the type member is TFPT_NONE, ITfCompartment::GetValue will return the data, regardless of the type.

If the returned data is TFPT_UNKNOWN type, the caller must call Release method of the returned IUnknown interface pointer.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCompartment::SetValue

The ITfCompartment::SetValue method sets the value of the data in the compartment.

HRESULT SetValue(
  TfClientId tid,
  VARIANT* pvarValue
);

Parameters

tid
[in] TBD
pvarValue
[in] TBD

Return Values

S_OK
The method completed successfully.

Remarks

If the compartment contains previous data, ITfCompartment::SetValue will overwrite it.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCompartmentEventSink

The ITfCompartmentEventSink interface is implemented by an application or TSF Text Services. The application and TSF Text Services can advise this event sink to the Text Services Framework compartment through the ITfSource interface to get the change notification of the compartment.

Methods

ITfCompartmentEventSink methods | Description
OnChange | Called when the data of the compartment is changed.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCompartmentEventSink::OnChange

The ITfCompartmentEventSink::OnChange method is called when the data of the compartment is changed.

HRESULT OnChange(
  REFGUID rguid
);

Parameters

rguid
[in] GUID to identify the TSF compartment.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCompartmentMgr

The ITfCompartmentMgr interface is implemented by TSF. An application and TSF Text Services can get or enumerate compartments using this interface. Applications and TSF Text Services can set and get actual data from an individual compartment using the ITfCompartment interface.

Some of the TSF objects enable an application or TSF Text Service to share static data between objects. A TSF compartment provides the data storage and notification mechanism for this data sharing. Each compartment is identified by a GUID, and can be made public and shared through publishing of the GUID. Using the GUID, anyone can get to the compartment object and make a modification.

Methods

ITfCompartmentMgr methods | Description
GetCompartment | Obtains the ITfCompartment interface pointer of the TSF Compartment object identified by the given GUID.
ClearCompartment | Clears the TSF compartment identified by the given GUID.
EnumCompartments | Retrieves the IEnumGUID interface pointer to enumerate GUIDs of the existing TSF compartment in the compartment manager.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCompartmentMgr::ClearCompartment

The ITfCompartmentMgr::ClearCompartment method clears the TSF compartment identified by the given GUID.

HRESULT ClearCompartment(
  TfClientId tid,
  REFGUID rguid
);

Parameters

tid
[in] TBD
rguid
[in] GUID to identify the Text Services Framework compartment.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCompartmentMgr::EnumCompartments

The ITfCompartmentMgr::EnumCompartments method retrieves the IEnumGUID interface pointer to enumerate GUIDs of the existing TSF compartment in the compartment manager.

HRESULT EnumCompartments(
  IEnumGUID **ppEnum
);

Parameters

ppEnum
[out] The pointer to the IEnumGUID interface pointer.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCompartmentMgr::GetCompartment

The ITfCompartmentMgr::GetCompartment method obtains the ITfCompartment interface pointer of the TSF compartment object identified by the given GUID.

HRESULT GetCompartment(
  REFGUID rguid,
  ITfCompartment **ppcomp
);

Parameters

rguid
[in] GUID to identify the Text Services Framework compartment
ppcomp
[out] Pointer to the ITfCompartment interface pointer to be obtained.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfComposition

The ITfComposition interface is implemented by Text Services Framework (TSF).

Methods in Vtable Order

ITfComposition methods | Description
GetRange | TBD
ShiftStart | TBD
ShiftEnd | TBD
EndComposition | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfComposition::EndComposition

The ITfComposition::EndComposition method is used by a TSF Text Service to terminate a composition. The composition object will not be freed until all references are released.

HRESULT EndComposition(
  TfEditCookie ecWrite
);

Parameters

ecWrite
[in] Edit cookie with write access to the context.

Return Values

S_OK
The method returned successfully.
TF_E_NOLOCK
Edit cookie is not a valid cookie
E_UNEXPECTED
This value is the result of one of the following conditions:
  • The composition has already terminated.
  • The caller is inside another composition write operation.
  • The caller does not own the composition.

Remarks

Context owners should use the ITFContextOwnerCompositionServices::TerminateComposition method to terminate compositions.

Besides terminating a composition, this method also does the following:

  • If the context owner has advised an ITfContextOwnerCompositionSink interface through the punk parameter of the ITfDocumentMgr::CreateContext method, the sink will receive an OnEndComposition callback.
  • Any ITfCompositionSink interface set by the owning TSF Text Service will be unadvised.
  • The GUID_PROP_COMPOSING property value is cleared over all text covered by the composition.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfComposition, ITfCompositionSink, ITfContextOwnerCompositionSink, ITFContextOwnerCompositionServices::TerminateComposition, ITfDocumentMgr::CreateContext


ITfComposition::GetRange

The ITfComposition::GetRange method returns a range positioned over the text covered by the composition. The range can be empty or be any length.

HRESULT GetRange(
  ITfRange** ppRange
);

Parameters

ppRange
[out] Receives a range positioned over the text covered by the composition.

Return Values

S_OK
The method returned successfully.
E_UNEXPECTED
The composition has already terminated.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfComposition


ITfComposition::ShiftEnd

The ITfComposition::ShiftEnd method repositions the end anchor of a composition to a location specified by the pNewEnd parameter. The method fails if the pNewEnd is positioned before the start anchor of the composition.

HRESULT ShiftEnd(
  TfEditCookie ecWrite,
  ITfRange* pNewEnd
);

Parameters

ecWrite
[in] Edit cookie with write access to the context.
pNewEnd
[in] Pointer to a range whose end anchor will be the new position of the composition end anchor.

Return Values

S_OK
The method returned successfully.
TF_E_NOLOCK
Edit cookie is not a valid cookie
E_UNEXPECTED
The composition has already terminated.
E_INVALIDARG
The method failed because the pNewEnd parameter is positioned before the end anchor.

Remarks

A TSF Text Service and use this method to remove text from the composition that still remains in the document. TSF Text Services will typically have a maximum composition size. If this composition size is exceeded, then the Text Service can use this method to truncate text without removing text from the document.

This method can also be used to absorb additional text bordering the edge of a composition into the composition by positioning the pNewEnd parameter after the existing end anchor of the composition.

Besides adjusting the range returned from subsequent ITfComposition::GetRange calls, this method also does the following:

  • If the pNewEnd parameter is positioned after the existing end anchor, the GUID_PROP_COMPOSING property value will be added to text between the new and original anchor position.
  • If the pNewEnd parameter is positioned before the existing end anchor, the GUID_PROP_COMPOSING property value will be cleared over the text between the new and original anchor position.
  • If the context owner has advised an ITfContextOwnerCompositionSink interface through the punk parameter of the ITfDocumentMgr::CreateContext method, the sink will receive an OnUpdateComposition callback.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfComposition


ITfComposition::ShiftStart

The ITfComposition::ShiftStart method repositions the start anchor of a composition to a location specified by the pNewEnd parameter. The method fails if the pNewEnd is positioned past the end anchor of the composition.

HRESULT ShiftStart(
  TfEditCookie ecWrite,
  ITfRange* pNewStart
);

Parameters

ecWrite
[in] Edit cookie with write access to the context.
pNewStart
[in] Pointer to a range whose start anchor will be the new position of the composition end anchor.

Return Values

S_OK
The method returned successfully.
TF_E_NOLOCK
Edit cookie is not a valid cookie
E_UNEXPECTED
The composition has already terminated.
E_INVALIDARG
The method failed because the pNewEnd parameter is positioned past the end anchor.

Remarks

A TSF Text Service and use this method to remove text from the composition that still remains in the document. TSF Text Services will typically have a maximum composition size. If this composition size is exceeded, then the Text Service can use this method to truncate text without removing text from the document.

This method can also be used to absorb additional text bordering the edge of a composition into the composition by positioning the pNewEnd parameter before the existing start anchor of the composition.

Besides adjusting the range returned from subsequent ITfComposition::GetRange calls, this method also does the following:

  • If the pNewEnd parameter is positioned before the existing start anchor, the GUID_PROP_COMPOSING property value will be added to text between the new and original anchor position.
  • If the pNewEnd parameter is positioned after the existing start anchor, the GUID_PROP_COMPOSING property value will be cleared over the text between the new and original anchor position.
  • If the context owner has advised an ITfContextOwnerCompositionSink interface through the punk parameter of the ITfDocumentMgr::CreateContext method, the sink will receive an OnUpdateComposition callback.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfComposition


ITfCompositionSink

The ITfCompositionSink interface is implemented by a TSF Text Service.

Methods in Vtable Order

ITfCompositionSink methods | Description
OnCompositionTerminated | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCompositionSink::OnCompositionTerminated

The ITfCompositionSink::OnCompositionTerminated method implemented by a text service is called when an application, using the ITfContextOwnerCompositionServices::TerminateComposition method, or the TSF Framework terminates a composition.

HRESULT OnCompositionTerminated(
  TfEditCookie ecWrite,
  ITfComposition* pComposition
);

Parameters

ecWrite
[in] Edit cookie with write access to the context.
pComposition
[in] The composition object that has been terminated.

Return Values

S_OK
The method returned successfully.

Remarks

Although there is no required action for the TSF Text Service to take upon receiving this callback, a TSF Text Service might use the ecWrite parameter to revert partially composed text into a reading string, or erase the composition entirely. The TSF Framework will automatically clear the GUID_PROP_COMPOSING property value over the affected text.

An ITfCompositionSink interface may optionally be advised to Cicero from the ITfContextComposition::StartComposition method.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfCompositionSink


ITfCompositionView

The ITfCompositionView interface is implemented by Text Services Framework (TSF).

Methods in Vtable Order

ITfCompositionView methods | Description
GetOwnerClsid | TBD
GetRange | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCompositionView::GetOwnerClsid

The ITfCompositionView::GetOwnerClsid method returns the class identifier of the TSF Text Service that created the composition object. Use this method to create a list of compositions owned by a text service.

HRESULT GetOwnerClsid(
  CLSID* pclsid
);

Parameters

pclsid
[out] Receives the class identifier of the text service owning the composition.

Return Values

S_OK
The method returned successfully.
E_UNEXPECTED
The composition has already terminated.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfCompositionView


ITfCompositionView::GetRange

The ITfCompositionView::GetRange method returns a range positioned over the text covered by the composition. The range can be empty or be any length.

HRESULT GetRange(
  ITfRange** ppRange
);

Parameters

ppRange
[out] Receives a range positioned over the text covered by the composition.

Return Values

S_OK
The method returned successfully.
E_UNEXPECTED
The composition has already terminated.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfCompositionView


ITfConfigureSystemKeystrokeFeed

The ITfConfigureSystemKeystrokeFeed interface is implemented by Text Services Framework (TSF). Query ITfThreadMgr to get this interface.

Methods

ITfConfigureSystemKeystrokeFeed methods | Description
DisableSystemKeystrokeFeed | TBD
EnableSystemKeystrokeFeed | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfConfigureSystemKeystrokeFeed::DisableSystemKeystrokeFeed

TBD

HRESULT DisableSystemKeystrokeFeed(void);

Parameters

This method has no parameters.

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfConfigureSystemKeystrokeFeed


ITfConfigureSystemKeystrokeFeed::EnableSystemKeystrokeFeed

TBD

HRESULT EnableSystemKeystrokeFeed(void);

Parameters

This method has no parameters.

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfConfigureSystemKeystrokeFeed


ITfContext

The ITfContext interface is implemented by Text Services Framework and represents an individual input context. An input context represents a text stream. This interface is used to manipulate text and properties of a specific text stream. In addition to raw text, input contexts also hold text properties. TSF Text Services can read from or write to these properties through the ITfProperty interface, which is accessed though ITfContext::GetProperty.

TSF Text Services can only read or write text with ranges accessed through input context methods such as ITfContextView::GetRangeFromPoint, ITfContext::GetSelection, ITfContext::GetStart, or ITfContext::GetEnd. TSF Text Services can also control the selection of text with ITfContext::SetSelection.

Methods

ITfContext methods | Description
RequestEditSession | Regulates access to the document text and properties and can request a document lock.
InWriteSession | Returns TRUE when there is currently a client inside a write access edit session and the tid matches the client ID.
GetSelection | Returns the details of any selected text within the document.
SetSelection | Selects text within the document.
GetStart | Returns a range positioned at the start of the document.
GetEnd | Returns a range positioned at the end of the document.
GetActiveView | Returns a reference to a ITfContextView interface.
EnumViews | Returns a reference to the IEnumTfContextViews interface.
GetStatus | Provides global state of the document in general.
GetProperty | Returns a reference to the ITfProperty interface and through that interface allow access to the property.
GetAppProperty | Gets the property specified by the guidProp parameter.
TrackProperties | TBD
EnumProperties | Returns a reference to the IEnumTfProperties interface.
GetDocumentMgr | Returns the document manager that contains the context.
CreateRangeBackup | Creates a backup of a range.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContext::CreateRangeBackup

The ITfContext::CreateRangeBackup method creates a backup of a range.

HRESULT CreateRangeBackup(
  TfEditCookie ec,
  ITfRange *pRange,
  ITfRangeBackup **ppBackup
);

Parameters

ec
[in] Edit cookie.
pRange
[in] Range object to be backed up.
ppBackup
[out] Range object that contains a backup of pRange.

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContext::EnumProperties

The ITfContext::EnumProperties method returns a reference to the IEnumTfProperties interface. This interface enables you to enumerate property objects.

HRESULT EnumProperties(
  IEnumTfProperties **ppEnum
);

Parameters

ppEnum
[out] Reference to the IEnumTfProperties interface.

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContext::EnumViews

The ITfContext::EnumViews method returns a reference to the IEnumTfContextViews interface. This interface enables you to enumerate document view objects that implement the ITfContextView interface.

HRESULT EnumViews(
  IEnumTfContextViews **ppEnum
);

Parameters

ppEnum
[out] Reference to the IEnumTfContextViews interface.

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContext::GetActiveView

The ITfContext::GetActiveView method returns a reference to a ITfContextView interface. The ITfContextView interface is implemented by Text Services Framework, and through this interface you can retrieve details about the current context.

HRESULT GetActiveView(
  ITfContextView **ppView
);

Parameters

ppView
[out] Reference to a ITfContextView interface.

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContext::GetAppProperty

The ITfContext::GetAppProperty method gets the property specified by the guidProp parameter.

HRESULT GetAppProperty(
  REFGUID guidProp,
  ITfReadOnlyProperty **ppProp
);

Parameters

guidProp
[in] GUID of the property.
ppProp
[out] The property specified by guidProp.

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContext::GetDocumentMgr

The ITfContext::GetDocumentMgr method returns the document manager that contains the context.

HRESULT GetDocumentMgr(
  ITfDocumentMgr **ppDm
);

Parameters

ppDm
[out] Receives the document manager that contains the context.

Return Values

S_OK
The method completed successfully.
S_FALSE
The context is not contained in any document manager. The value of ppDm will be NULL.

Remarks

If the context is not contained within a document manager, then ITfContext::GetDocumentMgr will return S_FALSE and ppDm receives a NULL pointer. This may occur because the context has been removed from the document manager stack through a call to ITfDocumentMgr::Pop or ITfThreadMgr::DisconnectDocumentMgr.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContext::GetEnd

The ITfContext::GetEnd method returns a range positioned at the end of the document.

HRESULT GetEnd(
  TfEditCookie ec,
  ITfRange **ppEnd
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession, or TFTextStoreImplCookie.
ppEnd
[out] Receives an empty range positioned at the end of the document.

Return Values

S_OK
The method completed successfully.
E_NOTIMPL
The application did not implement this functionality. This is usually an indication that calculating the end position requires excessive resources. If the end position is necessary, use ITfRange::GetText to calculate it.
TF_E_NOLOCK
The cookie in ec is not valid.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContext::GetProperty

The ITfContext::GetProperty method returns a reference to the ITfProperty interface and through that interface allow access to the property.

HRESULT GetProperty(
  REFGUID guidProp,
  ITfProperty **ppProp
);

Parameters

guidProp
[in] The GUID of the property.
ppProp
[out] Reference to the ITfProperty interface.

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContext::GetSelection

The ITfContext::GetSelection method returns the details of any selected text within the document.

HRESULT GetSelection(
  TfEditCookie ec,
  ULONG ulIndex,
  ULONG ulCount,
  TF_SELECTION *pSelection,
  ULONG *pcFetched
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession, or TFTextStoreImplCookie.
ulIndex
[in] Specifies the start index of the selection. May be any non-zero value, or use TFDEFAULT_SELECTION to specify the default selection index.
ulCount
[in] The maximum number of selections to return.
pSelection
[out] An array of ulCount TF_SELECTION structures.
pcFetched
[out] The number of structures in pSelection actually returned.

Return Values

S_OK
The method completed successfully.
TF_E_NOSELECTION
The document has no selection.
TF_E_NOLOCK
The cookie in ec is not valid.

Remarks

Some documents are capable of holding multiple spans of selected text. See the TFSF_DISJOINTSEL field from ITfContext::GetStatus. There may be only one zero-length selection in pSelection as it represents the position of the document caret.

A single TF_SELECTION structure may span multiple regions. It is the caller's responsibility to examine the text covered or use ITfRange::SnapToRegion for important information.

Callers may use the special TFDEFAULT_SELECTION index value for ulIndex, which treats ulIndex as if it had specified the caret, if there is one. To view the document as if it had a single selection, use TFDEFAULT_SELECTION and ask for a single selection.

The array returned by ITfContext::GetSelection contains TF_SELECTION structures in ascending order. The selections returned may not overlap. Each run of selected text is represented with a TF_SELECTION structure as follows.

typedef struct
{
TFActiveSelEnd ase;
BOOL fCharHighlight;
} TFSELECTIONSTYLE;
typedef struct
{
ITfRange *range;
TFSELECTIONSTYLE style;
} TFSELECTION;

The range parameter specifies the text covered by the selection.

Within the style structure, ase specifies which end of the selection will respond to user actions. For instance, in many applications holding the shift key down while using the arrow keys will move the active selection end left or right. The ase parameter may be TFAE_START, the range's start anchor is the active end, or TFAE_END, the range's end anchor is the active end, or TFAE_NONE, there is no active end.

If fCharHighlight is set TRUE, the selection spans exactly one character and is visually represented as a solid rectangle, which is usually flashing. This is a standard UI element of Korean and some Chinese character composition. Semantically, fCharHighlight is an indication that a specific character is being composed. Only a single selection may have fCharHighlight set TRUE. In this case, there will be no caret as the highlight takes its place.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContext::GetStart

The ITfContext::GetStart method returns a range positioned at the start of the document.

HRESULT GetStart(
  TfEditCookie ec,
  ITfRange **ppStart
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession, or TFTextStoreImplCookie.
ppStart
[out] Receives an empty range positioned at the head of the document.

Return Values

S_OK
The method completed successfully.
TF_E_NOLOCK
The cookie in ec is not valid.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContext::GetStatus

The ITfContext::GetStatus method provides global state of the document in general.

HRESULT GetStatus(
  TS_STATUS *pdcs
);

Parameters

pdcs
[out] TS_STATUS structure that specifies the state of the document.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContext::InWriteSession

The ITfContext::InWriteSession method returns TRUE when there is currently a client inside a write-access edit session and the tid matches the client identifier.

HRESULT InWriteSession(
  TfClientId tid,
  BOOL *pfWriteSession
);

Parameters

tid
[in] Caller client identifier.
pfWriteSession
[out] Set to TRUE, if tid is in a write session.

Return Values

S_OK
The method completed successfully.

Remarks

Clients can use ITfContext::InWriteSession from inside notification callbacks to determine whether or not they are responsible for the changes.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContext::RequestEditSession

The ITfContext::RequestEditSession regulates access to the document text and properties and can request a document lock.

HRESULT RequestEditSession(
  TfClientId tid,
  ITfEditSession *pes,
  DWORD dwFlags,
  HRESULT *phrSession
);

Parameters

tid
[in] Caller client identifier.
pes
[in] The callback object.
dwFlags
[in] This parameter is a combination of the following bit fields. \TFES_ASYNCOK allows an asynchronous callback. \TFES_READ requests a read lock only. \TFES_READWRITE requests read and write access.
phrSession
[out] The return value of pes, TF_S_ASYNC, or TF_E_SYNCHRONOUS.

Return Values

S_OK
The method completed successfully.
TF_E_LOCKED
The caller is within the context of another TSF Text Service which already holds a lock.

Remarks

If the call succeeds, but pes has not yet received its callback, phrSession will receive TF_S_ASYNC. If the caller has not set TFES_ASYNCOK and is unable to obtain synchronous access to the document, ITfContext::RequestEditSession will return S_OK but phrSession will receive TF_E_SYNCHRONOUS.

Pending asynchronous callbacks are always removed from the queue in the order received. A synchronous request, however, will be handled before any pending asynchronous callbacks.

TSF Text Services may request edit sessions within the context of an existing edit session, provided they do not request write access within a read only session. Calls to ITfContext::RequestEditSession within the context of another TSF Text Service edit session will fail with TF_E_LOCKED.

Synchronous RequestEditSession calls that specify TFES_READWRITE will always fail if made within the context of a notification (ITfTextEditSink::OnEndEdit, ITfTextLayoutSink::OnLayoutChange, ITfPropertyEventSink::OnUpdated, and so on). TSF Text Services should never modify the document in response to third-party edits. Doing so could result in dangerous cycles.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContext::SetSelection

The ITfContext::SetSelection method selects text within the document.

HRESULT SetSelection(
  TfEditCookie ec,
  ULONG ulCount,
  const TF_SELECTION *pSelection
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession, or TFTextStoreImplCookie.
ulCount
[in] Number of selection runs in pSelection.
pSelection
[in] An array of ulCount TF_SELECTION structures.

Return Values

S_OK
The method completed successfully.
TF_E_NOSELECTION
The document has no selection.
TF_E_NOLOCK
The cookie in ec is not valid.

Remarks

Some documents are capable of holding multiple spans of selected text. See the TFSF_DISJOINTSEL field from ITfContext::GetStatus. There may be only one zero-length selection in pSelection as it represents the position of the document caret.

TF_SELECTION structures that are passed to ITfContext::SetSelection may span multiple regions.

If an application needs to adjust the text covered by a selection, it must wait until the caller releases the lock. However, applications may freely adjust any of the style fields (style.ase, style.fCharHighlight) within a selection while still returning S_OK.

The caller may set the fCharHighlight flag TRUE in single selection only. The selection should span exactly one character and ase should be set TFAE_NONE. Because the character highlight takes the place of the caret, none of the other selections passed in can be of zero length if a selection's fCharHighlight is set TRUE.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContext::TrackProperties

The ITfContext::TrackProperties method returns a special property whose value over a span of text is an IEnumTfPropertyValue interface. The IEnumTfPropertyValue enumerates all the values of the properties specified in the prgProp and prgAppProp properties.

HRESULT TrackProperties(
  const GUID **prgProp,
  ULONG cProp,
  const GUID **prgAppProp,
  ULONG cAppProp,
  ITfReadOnlyProperty **ppProperty
);

Parameters

prgProp
[in] Array of property GUIDs to track.
cProp
[in] Number of GUIDs in the prgProp array.
prgAppProp
[in] Array of application property GUIDs to track.
cAppProp
[in] Number of GUIDs in the prgAppProp array.
ppProperty
[out] Receives tracking property.

Return Values

S_OK
The method completed successfully.
TF_E_DISCONNECTED
The context object is not on a document stack.

Remarks

Use this method when the caller wants to quickly identify runs of text with consistent property values for more than one property, such as while rendering. While you can implement this method using only the ITfContext::GetProperty method, the TSF Framework can accomplish this task internally and more quickly.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextComposition

The ITfContextComposition interface is implemented by Text Services Framework (TSF).

Methods in Vtable Order

ITfContextComposition methods | Description
StartComposition | TBD
EnumCompositions | TBD
FindComposition | TBD
TakeOwnership | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextComposition::EnumCompositions

The ITfContextComposition::EnumCompositions method returns an enumerator of all compositions in the context.

HRESULT EnumCompositions(
  IEnumITfCompositionView** ppEnum
);

Parameters

ppEnum
[out] Receives an enumeration of all compostion objects in the context.

Return Values

S_OK
The method returned successfully.
TF_E_DISCONNECTED
The context object is not on a document stack.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfContextComposition


ITfContextComposition::FindComposition

The ITfContextComposition::FindComposition method returns an enumeration of compositions that intersect the text covered by the pTestRange parameter. If pTestRange is NULL, all compositions in the context will be enumerated.

HRESULT FindComposition(
  TfEditCookie ecRead,
  ITfRange* pTestRange,
  IEnumITfCompositionView** ppEnum
);

Parameters

ecRead
[in] Edit cookie with read access to the context.
pTestRange
[in] Range specifying which text to search. This parameter may be NULL.
ppEnum
[out] Receives an enumeration of all composition objects covered by the pTestRange parameter.

Return Values

S_OK
The method returned successfully.
TF_E_DISCONNECTED
Context object is not on a document stack.
TF_E_NOLOCK
The ecRead parameter is not a valid edit cookie.

Remarks

Callers can use the ITfCompositionView::GetOwnerClsid method to identify owned compositions returned by the enumerator.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfContextComposition


ITfContextComposition::StartComposition

The ITfContextComposition::StartComposition method is used by TSF Text Services to start a new composition.

HRESULT StartComposition(
  TfEditCookie ecWrite,
  ITfRange* pCompositionRange,
  ITfCompositionSink* pSink,
  ITfComposition** ppComposition
);

Parameters

ecWrite
[in] Edit cookie with write access to the content.
pCompositionRange
[in] Range specifying the text the composition will initially cover.
pSink
[in] Optional notification sink. May be NULL. If supplied, the sink will be released when the composition is terminated.
ppComposition
[out] Receives the new composition. May be NULL if the context owner rejects the composition.

Return Values

S_OK
The method returned successfully.
TF_E_DISCONNECTED
The context object is not on a document stack.
TF_E_NOLOCK
The ecWrite parameter is not a valid cookie.
E_UNEXPECTED
Call is reentrant with another composition operation.

Remarks

This method also does the following:

  • If the context owner has advised an ITfContextOwnerCompositionSink interface, the context owner will receive an OnStartComposition callback. If the context owner rejects the new composition, this method will still return S_OK but the ppComposition parameter will be set to NULL.
  • If pCompositionRange is not empty, any covered text will receive the GUID_PROP_COMPOSING property.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfContextComposition


ITfContextComposition::TakeOwnership

TBD

HRESULT TakeOwnership(
  TfEditCookie ecWrite,
  ITfCompositionView* pComposition,
  ITfCompositionSink* pSink,
  ITfComposition** ppComposition
);

Parameters

ecWrite
[in] TBD
pComposition
[in] TBD
pSink
[in] TBD
ppComposition
[out] TBD

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfContextComposition


ITfContextKeyEventSink

The ITfContextKeyEventSink interface is implemented by applications to receive notifications when a key up or key down event occurs.

Methods

ITfContextKeyEventSink methods | Description
OnKeyDown | Invoked when a key-down event occurs.
OnKeyUp | Invoked when a key-up event occurs.
OnTestKeyDown | TBD
OnTestKeyUp | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextKeyEventSink::OnKeyDown

The ITfContextKeyEventSink::OnKeyDown method is invoked when a key-down event occurs.

HRESULT OnKeyDown(
  WPARAM wParam,
  LPARAM lParam,
  BOOL *pfEaten
);

Parameters

wParam
[in] Specifies the virtual-key code of the non-system key.
lParam
[in] Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag.
pfEaten
[out] TRUE on exit if this key has been handled. Otherwise FALSE.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfContextKeyEventSink::OnKeyUp


ITfContextKeyEventSink::OnKeyUp

The ITfContextKeyEventSink::OnKeyUp method is invoked when a key-up event occurs.

HRESULT OnKeyUp(
  WPARAM wParam,
  LPARAM lParam,
  BOOL *pfEaten
);

Parameters

wParam
[in] Specifies the virtual-key code of the non-system key.
lParam
[in] Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag.
pfEaten
[out] TRUE on exit if this key has been handled. Otherwise FALSE.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfContextKeyEventSink::OnKeyDown


ITfContextKeyEventSink::OnTestKeyDown

TBD

HRESULT OnTestKeyDown(
  WPARAM wParam,
  LPARAM lParam,
  BOOL *pfEaten
);

Parameters

wParam
[in] TBD
lParam
[in] TBD
pfEaten
[out] TBD

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextKeyEventSink::OnTestKeyUp

TBD

HRESULT OnTestKeyUp(
  WPARAM wParam,
  LPARAM lParam,
  BOOL *pfEaten
);

Parameters

wParam
[in] TBD
lParam
[in] TBD
pfEaten
[out] TBD

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextOwner

The ITfContextOwner interface is implemented by an application and enables you to access context owner details. An individual input context represents a text stream and is accessed through the ITfContext interface. Input context owners are all applications as well as TSF Text Services or controls that create their own input contexts.

Methods

ITfContextOwner methods | Description
GetACPFromPoint | Converts a point in screen coordinates to a character offset.
GetTextExt | Returns the bounding box in screen coordinates of a range of text.
GetScreenExt | Returns the bounding box of the display surface upon which this text stream is rendered.
GetStatus | Provides the global status of the document in general.
GetWnd | Returns an HWND corresponding to the document, if one exists.
GetAttribute | Returns the attribute specified by the rguidAttribute parameter.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextOwner::GetACPFromPoint

The ITfContextOwner::GetACPFromPoint method converts a point in screen coordinates to a character offset.

HRESULT GetACPFromPoint(
  const POINT *ptScreen,
  DWORD dwFlags,
  LONG *pacp
);

Parameters

ptScreen
[in] A point in screen coordinates.
dwFlags
[in] A bit field specifying how to handle exceptional cases.
pacp
[out] Receives the character offset corresponding to ptScreen.

Return Values

S_OK
The method completed successfully.
TS_E_NOLAYOUT
The application has not calculated a text layout yet.
TS_E_INVALIDPOINT
The ptScreen parameter is not within the bounding box of any character.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextOwner::GetAttribute

The ITfContextOwner::GetAttribute method returns the attribute specified by the rguidAttribute parameter.

HRESULT GetAttribute(
  REFGUID rguidAttribute,
  VARIANT* pvarValue
);

Parameters

rguidAttribute
[in] GUID of the attribute.
pvarValue
[out] The attribute specified by rguidAttribute.

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextOwner::GetScreenExt

The ITfContextOwner::GetScreenExt method returns the bounding box of the display surface upon which this text stream is rendered.

HRESULT GetScreenExt(
  RECT *prc
);

Parameters

prc
[out] Receives the bounding box, in screen coordinates, of the display surface upon which this text stream is rendered.

Return Values

S_OK
The method completed successfully.

Remarks

If the text is not currently displayed, for instance if the document window is minimized, prc will be set to { 0, 0, 0, 0 }.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextOwner::GetStatus

The ITfContextOwner::GetStatus method provides the global status of the document in general.

HRESULT GetStatus(
  TF_STATUS *pdcs
);

Parameters

pdcs
[out] Data structure that specifies the status of the document in general.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextOwner::GetTextExt

The ITfContextOwner::GetTextExt method returns the bounding box in screen coordinates of a range of text.

HRESULT GetTextExt(
  LONG acpStart,
  LONG acpEnd,
  RECT *prc,
  BOOL *pfClipped
);

Parameters

acpStart
[in] Offset of the start of the text range.
acpEnd
[in] Offset of the end of the text range.
prc
[out] Receives the bounding box in screen coordinates of the text range.
pfClipped
[out] Specifies whether prc has been clipped.

Return Values

S_OK
The method completed successfully.
TS_E_NOLAYOUT
The application has not calculated a text layout yet.
TS_E_INVALIDPOS
The range specified by acpStart and acpEnd extends past the end of the document or the top of the document.

Remarks

If the document window is minimized, or if the specified text is not currently visible, ITfContextOwner::GetTextExt returns S_OK with prc set to {0,0,0,0}.

If pfClipped is set TRUE, then prc does not include the entire text range requested. The bounding box has been clipped because some of the requested range is not visible.

If the method call fails with return code TS_E_NOLAYOUT, the client should not expect any further calls to succeed until the applications calls ITfContextOwnerSink::OnLayoutChange.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextOwner::GetWnd

The ITfContextOwner::GetWnd method returns an HWND corresponding to the document, if one exists.

HRESULT GetWnd(
  HWND *phwnd
);

Parameters

phwnd
[out] Receives an HWND corresponding to the document, which may be NULL if the document does not have a corresponding HWND or does not know of its corresponding HWND.

Return Values

S_OK
The method completed successfully.

Remarks

A document may not have a corresponding HWND if, for instance, the document is in memory which is not displayed on the screen; or if the document is a window-less control, and does not know of its owner's HWND.

For this reason callers cannot assume phwnd will receive a non-NULL value even when ITfContextOwner::GetWnd returns S_OK.

Multiple documents may return the same HWND value. Also, multiple calls on the same document to ITfContextOwner::GetWnd may return different values. Callers should use ITfContextOwner::GetWnd for issues such as z-ordering windows, because there is no formal connection between ITfContextOwner documents and HWNDs.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextOwnerCompositionServices

The ITfContextOwnerCompositionServices interface is implemented by Text Services Framework (TSF).

Methods in Vtable Order

ITfContextOwnerCompositionServices methods | Description
TerminateComposition | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextOwnerCompositionServices::TerminateComposition

The ITfContextOwnerCompositionServices::TerminateComposition method is used by context owners to end a composition.

HRESULT TerminateComposition(
  ITfCompositionView* pComposition
);

Parameters

pComposition
[in] Pointer to compositions to terminate. If NULL then all compositions in the context will be terminated..

Return Values

S_OK
The method completed successfully.
TF_E_DISCONNECTED
Context object is not on a document stack.
TF_E_NOLOCK
A TSF Text Service already holds the document lock.
E_UNEXPECTED
Call is reentrant with another composition operation.

Remarks

TSF Text Services should use the ITfComposition::EndComposition to terminate Text Services compositions.

If the context owner implements the text store, the context owner must be ready to grant a synchronous write lock before calling this method.

This method also does the following:

  • For each composition terminated, the owning text service that has advised an ITfCompositionSink interface will receive an OnCompositionTerminated callback.
  • If the context owner has advised an ITfContextOwnerCompositionSink interface, the context owner will receive one OnEndComposition callback for each composition terminated.
  • The GUID_PROP_COMPOSING property will be cleared over text covered by each terminated composition.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextOwnerCompositionSink

The ITfContextOwnerCompositionSink interface is implemented by an input context owner such as an application or control.

Methods in Vtable Order

ITfContextOwnerCompositionSink methods | Description
OnStartComposition | TBD
OnUpdateComposition | TBD
OnEndComposition | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextOwnerCompositionSink::OnEndComposition

The ITfContextOwnerCompositionSink::OnEndComposition method implemented by a context owner is called by the TSF Text Framework when a composition is terminated, just before the composition is shut down.

HRESULT OnEndComposition(
  ITfCompositionView* pComposition
);

Parameters

pComposition
[in] Composition object that is ending.

Return Values

S_OK
The method returned successfully.

Remarks

The GUID_PROP_COMPOSING property values over the text covered by the composition will be cleared by the TSF Framework after this method is called.

Although there is no required action for this method, context owners should respect any document lock held by a text service when the method is called.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfContextOwnerCompositionSink


ITfContextOwnerCompositionSink::OnStartComposition

The ITfContextOwnerCompositionSink::OnStartComposition method implemented by a context owner is called by the TSF Text Framework when a composition is created. Compositions may be created by either TSF Text Services or automatically by the TSF Framework to cover text edits that are not already covered by a composition.

HRESULT OnStartComposition(
  ITfCompositionView* pComposition,
  BOOL* pfOk
);

Parameters

pComposition
[in] The new composition
pfOk
[out] Receives a flag that grants or denies the new composition.

Return Values

S_OK
The method returned successfully.

Remarks

Creating a new composition occurs unless a context owner aborts the creation by returning FALSE in the pfOk parameter. A composition is usually aborted by a TSF Application because the composition is at a read-only location or because the internal limit on the number of simultaneous compositions has been exceeded. Most applications support only a single composition.

If the composition is aborted because the pfOk parameter is set to FALSE and there are other compositions active, the TSF Framework will terminate the oldest composition object then call the OnStartComposition one more time. If the call is rejected again, no further action will be taken.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfContextOwnerCompositionSink


ITfContextOwnerCompositionSink::OnUpdateComposition

The ITfContextOwnerCompositionSink::OnUpdateComposition method implemented by a context owner calls the OnUpdateComposition method when a text covered by the composition is modified or a TSF Text Service truncates or expands the range of text covered by the composition through the ITfComposition::ShiftStart or ShiftEnd methods.

HRESULT OnUpdateComposition(
  ITfCompositionView* pComposition,
  ITfRange* pRangeNew
);

Parameters

pComposition
[in] Composition object receiving the update.
pRangeNew
[in] Range the composition will cover after the method return.

Return Values

S_OK
The method returned successfully.

Remarks

No action is required in response to a method call. Since a TSF Text Service will hold the document lock when this method is called, TSF Applications should any document modification until after the lock is released.

To determine if existing text has been added or removed from the composition, TSF Applications may compare the pRangeNew property with the range returned from the ITfCompositionView::GetRange method. The ITfCompositionView::GetRange method will not be updated until after the call to the OnUpdateComposition returns a result.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfContextOwnerCompositionSink


ITfContextOwnerServices

The ITfContextOwnerServices interface is implemented by TSF. This interface is accessed through a query to ITfContext, which is implemented by TSF and represents an individual input context. An input context represents a text stream. Input context owners are all applications as well as TSF Text Services or controls that create their own input contexts.

Methods

ITfContextOwnerServices methods | Description
OnLayoutChange | Called when the on-screen representation of the text stream has changed.
OnStatusChange | Called when the status of the context owner changes.
OnAttributeChange | Called when the data of the attribute is changed.
Serialize | Serializes (arranges in a series) property header information.
Unserialize | Unserializes property header information.
ForceLoadProperty | Forces the load of a property.
CreateRange | Creates a new Application Character Position (ACP)-based range.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextOwnerServices::CreateRange

The ITfContextOwnerServices::CreateRange method creates a new Application Character Position (ACP)-based range.

HRESULT CreateRange(
  LONG acpStart,
  LONG acpEnd,
  ITfRangeACP **ppRange
);

Parameters

acpStart
[in] The start of the ACP-based range.
acpEnd
[in] The end of the ACP-based range.
ppRange
[out] A range object starting at the position specified by acpStart and ending at the position specified by acpEnd.

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextOwnerServices::ForceLoadProperty

The ITfContextOwnerServices::ForceLoadProperty method forces the load of a property.

HRESULT ForceLoadProperty(
  ITfProperty *pProp
);

Parameters

pProp
[in] The property to be loaded.

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextOwnerServices::OnAttributeChange

The ITfContextOwnerServices::OnAttributeChange method is called when the data of the attribute is changed.

HRESULT OnAttributeChange(
  REFGUID rguidAttribute
);

Parameters

rguidAttribute
[in] GUID to identify the attribute.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextOwnerServices::OnLayoutChange

The ITfContextOwnerServices::OnLayoutChange method is called when the on-screen representation of the text stream has changed.

HRESULT OnLayoutChange(void);

Parameters

This method has no parameters.

Return Values

S_OK
The method completed successfully.

Remarks

A call to ITfContextOwnerServices::OnLayoutChange could be in response to a text edit, font size change, window movement/resizing, and so on.

If a call to ITfContextView::GetTextExt or ITfContextOwner::GetACPFromPoint fails because the application did not calculate the screen layout (Return Value: TS_E_NOLAYOUT), the application must then call ITfContextOwnerServices::OnLayoutChange when the information is ready.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextOwnerServices::OnStatusChange

The ITfContextOwnerServices::OnStatusChange method is called when the status of the context owner changes.

HRESULT OnStatusChange(
  DWORD dwFlags
);

Parameters

dwFlags
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextOwnerServices::Serialize

The ITfContextOwnerServices::Serialize method serializes (arranges in a series) property header information. Property header information is stored in the TF_PERSISTENT_PROPERTY_HEADER_ACP structure.

HRESULT Serialize(
  ITfProperty *pProp,
  ITfRange *pRange,
  TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
  IStream *pStream
);

Parameters

pProp
[in] The relevant property object.
pRange
[in] The relevant range object.
pHdr
[out] Receives the property header information.
pStream
[in] TBD

Return Values

S_OK
The method completed successfully.
S_FALSE
The property data is not supported to be persisted.

Remarks

When ITfContextOwnerServices::Serialize starts to save the data, it should not change the seek point of pStream. And, when it has completed the data save, it must not move or reset the seek pointer.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

TF_PERSISTENT_PROPERTY_HEADER_ACP


ITfContextOwnerServices::Unserialize

The ITfContextOwnerServices::Unserialize method unserializes property header information.

HRESULT Unserialize(
  ITfProperty *pProp,
  TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
  IStream *pStream,
  ITfPersistentPropertyLoaderACP *pLoader
);

Parameters

pProp
[in] The relevant property object.
pHdr
[in] The property header information.
pStream
[in] TBD
pLoader
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

TF_PERSISTENT_PROPERTY_HEADER_ACP


ITfContextView

The ITfContextView interface is implemented by TSF. An individual input context represents a text stream. This interface enables you to access information about an input context, such as the bounding box of the display surface, or the bounding box of a range of text.

Methods

ITfContextView methods | Description
GetRangeFromPoint | Converts a point in screen coordinates to an empty range positioned at a corresponding location.
GetTextExt | Returns the bounding box in screen coordinates of a range of text.
GetScreenExt | Returns the bounding box of the display surface.
GetWnd | Returns an HWND corresponding to the document, if one exists.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfContext


ITfContextView::GetRangeFromPoint

The ITfContextView::GetRangeFromPoint method converts a point in screen coordinates to an empty range positioned at a corresponding location.

HRESULT GetRangeFromPoint(
  TfEditCookie ec,
  const POINT *ppt,
  DWORD dwFlags,
  ITfRange **ppRange
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession, or TFTextStoreImplCookie.
ppt
[in] A point in screen coordinates.
dwFlags
[in] A bit field specifying how to handle exceptions.
ppRange
[out] Receives a new range matching the anchor position of the POINT.

Return Values

S_OK
The method completed successfully.
TF_E_INVALIDPOINT
The pptScreen parameter does not cover any document text.
TF_E_NOLAYOUT
The application has not calculated a text layout yet.
TF_E_NOLOCK
The cookie in ec is not valid.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextView::GetScreenExt

The ITfContextView::GetScreenExt method returns the bounding box of the display surface.

HRESULT GetScreenExt(
  RECT *prc
);

Parameters

prc
[out] Receives the bounding box in screen coordinates of the display surface.

Return Values

S_OK
The method completed successfully.

Remarks

The prc parameter will be cleared to { 0, 0, 0, 0 } if the document is not currently being displayed.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextView::GetTextExt

The ITfContextView::GetTextExt method returns the bounding box in screen coordinates of a range of text.

HRESULT GetTextExt(
  TfEditCookie ec,
  ITfRange *pRange,
  RECT *prc,
  BOOL *pfClipped
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession, or TFTextStoreImplCookie.
pRange
[in] The range of the text.
prc
[out] Receives the bounding box in screen coordinates of the text range.
pfClipped
[out] Specifies whether or not prc has been clipped.

Return Values

S_OK
The method completed successfully.
TS_E_NOLAYOUT
The application has not calculated a text layout yet.
TS_E_INVALIDPOS
The range specified by acpStart and acpEnd extends past the end of the document or the top of the document.

Remarks

If the document window is minimized, or if the specified text is not currently visible, ITfContextView::GetTextExt returns S_OK with prc set to {0,0,0,0}.

If pfClipped is set TRUE, then prc does not include the entire text range requested. The bounding box has been clipped because some of the requested range is not visible.

If the method call fails with return code TS_E_NOLAYOUT, the client should not expect any further calls to succeed until the applications calls ITfContextViewSink::OnLayoutChange.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfContextView::GetWnd

The ITfContextView::GetWnd method returns an HWND corresponding to the document, if one exists.

HRESULT GetWnd(
  HWND *phwnd
);

Parameters

phwnd
[out] Receives an HWND corresponding to the document.

Return Values

S_OK
The method completed successfully.

Remarks

A document may not have a corresponding HWND if, for instance, the document is not currently being rendered. For this reason, callers cannot assume phwnd will receive a non-NULL value even when ITfContextView::GetWnd returns S_OK.

It is by design that multiple documents may return the same HWND value, or for multiple calls to ITfContextView::GetWnd on the same document to return different values. Because there is no formal connection between contexts and HWNDs, callers should use ITfContextView::GetWnd for issues like z-ordering windows.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCreatePropertyStore

The ITfCreatePropertyStore interface is implemented by TSF Text Services and you create a property store using this interface.

Methods

ITfCreatePropertyStore methods | Description
IsStoreSerializable | TBD
CreatePropertyStore | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCreatePropertyStore::CreatePropertyStore

TBD

HRESULT CreatePropertyStore(
  REFGUID guidProp,
  ITfRange *pRange,
  ULONG cb,
  IStream *pStream,
  ITfPropertyStore **ppStore
);

Parameters

guidProp
[in] GUID to specify the type of the property.
pRange
[in] A pointer of ITfRange interface that is the target range of the property.
cb
[in] The size of the property data that is read from pStream.
pStream
[in] On exit contains the new PropertyStore object that expose ITfPropertyStore interface.
ppStore
[out] TBD

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfCreatePropertyStore::IsStoreSerializable

TBD

HRESULT IsStoreSerializable(
  REFGUID guidProp,
  ITfRange *pRange,
  ITfPropertyStore *pPropStore,
  BOOL *pfSerializable
);

Parameters

guidProp
[in] TBD
pRange
[in] TBD
pPropStore
[in] TBD
pfSerializable
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfDisplayAttributeInfo

The ITfDisplayAttributeInfo interface is implemented by TSF Text Services. Use this interface to retrieve display attribute information such as a GUID or description. Display attribute information is also stored within the TF_DISPLAYATTRIBUTE structure, accessed through the SetAttributeInfo and GetAttributeInfo methods of this interface.

Methods

ITfDisplayAttributeInfo methods | Description
GetGUID | Returns an actual GUID value that will be stored in the Display Attribute Property.
GetDescription | Obtains the description of this display attribute information.
GetAttributeInfo | TBD
SetAttributeInfo | Sets the new attribute information.
Reset | Resets the attribute information to the default value.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

TF_DISPLAYATTRIBUTE


ITfDisplayAttributeInfo::GetAttributeInfo

TBD

HRESULT GetAttributeInfo(
  TF_DISPLAYATTRIBUTE *pda
);

Parameters

pda
[out] On exit, contains the TF_DISPLAYATTRIBUTE structure.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfDisplayAttributeInfo::GetDescription

The ITfDisplayAttributeInfo::GetDescription method obtains the description of this display attribute information.

HRESULT GetDescription(
  BSTR *pbstrDesc
);

Parameters

pbstrDesc
[out] On exit, contains the description of this display attribute information.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfDisplayAttributeInfo::GetGUID

The ITfDisplayAttributeInfo::GetGUID method returns an actual GUID value that will be stored in the Display Attribute Property.

HRESULT GetGUID(
  GUID *pguid
);

Parameters

pguid
[out] On exit, contains the GUID that identify the Display Attribute Property that the display attribute information is stored in.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfDisplayAttributeInfo::Reset

The ITfDisplayAttributeInfo::Reset method resets the attribute information to the default value.

HRESULT Reset(void);

Parameters

This method has no parameters.

Return Values

S_OK
The method completed successfully.

Remarks

The Display Attribute Setup UI will call this method to reset the value to the default.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfDisplayAttributeInfo::SetAttributeInfo

The ITfDisplayAttributeInfo::SetAttributeInfo method sets the new attribute information. The attribute information is saved as static data.

HRESULT SetAttributeInfo(
  TF_DISPLAYATTRIBUTE *pda
);

Parameters

pda
[in] Contains the TF_DISPLAYATTRIBUTE structure to set.

Return Values

S_OK
The method completed successfully.

Remarks

The new attribute information that is set by ITfDisplayAttributeInfo::SetAttributeInfo is static data. TSF Text Services must save this value, and return the latest value by ITfDisplayAttributeInfo::GetAttributeInfo.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfDisplayAttributeMgr

The ITfDisplayAttributeMgr interface is implemented by Text Services Framework and is used to manage display attribute information. With this interface you can get and enumerate display attribute information objects. Individual display attribute information objects are accessed through the ITfDisplayAttributeInfo interface, which is retrieved through ITfDisplayAttributeMgr::GetDisplayAttributeInfo.

Methods

ITfDisplayAttributeMgr methods | Description
OnUpdateInfo | Called by TSF Text Services when the attribute information is updated.
EnumDisplayAttributeInfo | Obtains a pointer to a new enumerator of the display attribute information objects.
GetDisplayAttributeInfo | Obtains a pointer to a new display attribute information object specified by the GUID in the guid parameter.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfDisplayAttributeMgr::EnumDisplayAttributeInfo

The ITfDisplayAttributeMgr::EnumDisplayAttributeInfo method obtains a pointer to a new enumerator of the display attribute information objects. Applications enumerate all the attribute information to draw the text.

HRESULT EnumDisplayAttributeInfo(
  IEnumTfDisplayAttributeInfo **ppEnum
);

Parameters

ppEnum
[out] On exit, contains a pointer to a new enumerator of the display attribute information objects.

Return Values

S_OK
The method completed successfully.

Remarks

Applications enumerate the display attribute information to draw the text. The display attribute setup user interface calls ITfDisplayAttributeManager::EnumDisplayAttributeInfo to customize display attributes.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

IEnumTfDisplayAttributeInfo


ITfDisplayAttributeMgr::GetDisplayAttributeInfo

The ITfDisplayAttributeMgr::GetDisplayAttributeInfo method obtains a pointer to a new display attribute information object specified by the GUID in the guid parameter.

HRESULT GetDisplayAttributeInfo(
  REFGUID guid,
  ITfDisplayAttributeInfo **ppInfo,
  CLSID *pclsidOwner
);

Parameters

guid
[in] The GUID to identify a display attribute information object.
ppInfo
[out] On exit, contains a pointer to a new display attribute information object specified by the GUID in the guid parameter.
pclsidOwner
[out] TBD

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfDisplayAttributeMgr::OnUpdateInfo

The ITfDisplayAttributeMgr::OnUpdateInfo method is called by TSF Text Services when the attribute information is updated.

HRESULT OnUpdateInfo(void);

Parameters

This method has no parameters.

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfDisplayAttributeNotifySink

The ITfDisplayAttributeNotifySink interface is implemented by applications to receive notifications when display attribute information is updated.

Methods

ITfDisplayAttributeNotifySink methods | Description
OnUpdateInfo | Invoked when display attribute information is updated.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfDisplayAttributeNotifySink::OnUpdateInfo

The ITfDisplayAttributeNotifySink::OnUpdateInfo method is invoked when display attribute information is updated.

HRESULT OnUpdateInfo(void);

Parameters

This method has no parameters.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfDisplayAttributeProvider

The ITfDisplayAttributeProvider interface is implemented by TSF Text Services. You can enumerate or access individual display attribute information objects with this interface.

Methods

ITfDisplayAttributeProvider methods | Description
EnumDisplayAttributeInfo | Points to a new enumerator of the display attribute information of the current provider.
GetDisplayAttributeInfo | Obtains a pointer to a new DisplayAttributeInfo object for the GUID.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfDisplayAttributeProvider::EnumDisplayAttributeInfo

The ITfDisplayAttributeProvider::EnumDisplayAttributeInfo method points to a new enumerator of the display attribute information of the current provider.

HRESULT EnumDisplayAttributeInfo(
  IEnumTfDisplayAttributeInfo **ppEnum
);

Parameters

ppEnum
[out] On exit, contains a pointer to a new enumerator of the display attribute information of this provider.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfDisplayAttributeProvider::GetDisplayAttributeInfo

The ITfDisplayAttributeProvider::GetDisplayAttributeInfo method obtains a pointer to a new DisplayAttributeInfo object for the GUID.

HRESULT GetDisplayAttributeInfo(
  REFGUID guid,
  ITfDisplayAttributeInfo **ppInfo
);

Parameters

guid
[in] The GUID to identify a display attribute information.
ppInfo
[out] On exit, contains a pointer to a new DisplayAttributeInfo object for the GUID.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfDocumentMgr

The ITfDocumentMgr interface is implemented by Text Services Framework and is an interface into a document manager. All document managers are inside of a thread manager, which is the root object of the Text Services Framework (TSF). A thread manager is accessed through the ITfThreadMgr interface. The thread manager is responsible for creation of document managers, and creates a document manager at the application's request for each stream of editable text. You can access each stream of editable text is through the ITfContext interface, accessed through ITfDocumentMgr.

Methods

ITfDocumentMgr methods | Description
CreateContext | TBD
Push | TBD
Pop | TBD
GetTop | TBD
GetBase | TBD
EnumContexts | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfDocumentMgr::CreateContext

The ITfDocumentMgr::CreateContext method creates a new context object. Applications can call this method for TSF Text Services to interact with text buffers. TSF Text Services can call this method to redirect the input focus from existing context in the same document, such as to display an alternate list.

HRESULT CreateContext(
  TfClientId tidOwner,
  DWORD dwFlags,
  IUnknown *punk,
  ITfContext **ppic,
  TfEditCookie *pecTextStore
);

Parameters

tidOwner
[in] Client identifier of the calling method. This value is from an application using the ITfThreadMgr::Activate method or from a TSF Text Services using the ITfTextInputProcessor::Activate method.
dwFlags
[in] Reserved, must be zero.
punk
[in] Pointer to the ITextStore or ITfContextOwnerCompositionSink interface. This value may be NULL.
ppic
[out] Receives the new context
pecTextStore
[out] Receives a read-only edit cookie for the new context.

Return Values

S_OK
The method completed successfully.

Remarks

The TSF Text Services will start interacting with the context only after the context is attached to the document using the ITfDocumentMgr::Push method. Initialize the context before calling the Push method so that the TSF Text Service does not confuse existing text or properties with the previous contents of the document and to avoid any analysis of text before corresponding properties are unpersisted.

All references to the punk parameter will be released when the context is destroyed or when the context is uninitialized with the ITfDocumentMgr::Pop method

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfContextOwnerCompositionSink, ITfDocumentMgr::Pop, ITfDocumentMgr::Push, ITfTextInputProcessor::Activate, ITfThreadMgr::Activate, TfClientId


ITfDocumentMgr::EnumContexts

The ITfDocumentMgr::EnumContexts method returns an enumeration of all the contexts on the stack. If the document does not have any contexts, the enumerator will be empty.

HRESULT EnumContexts(
  IEnumTfContexts **ppEnum
);

Parameters

ppEnum
[out] Receives an enumeration of all the contexts currently on the stack.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfDocumentMgr::GetBase

The ITfDocumentMgr::GetBase method returns the context at the root of the context stack in the document object. The context at the root, or base context, is the first context added to the context stack by an application through the ITfDocumentMgr::Push method.

HRESULT GetBase(
  ITfContext **ppic
);

Parameters

ppic
[out] Receives the base context.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfDocumentMgr::GetTop, ITfDocumentMgr::Push


ITfDocumentMgr::GetTop

The ITfDocumentMgr::GetTop method returns the context at the top of the context stack for the document object. The context at the top is the last context added by an application through the ITfDocumentMgr::Push method.

HRESULT GetTop(
  ITfContext **ppic
);

Parameters

ppic
[out] Receives the base context.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfDocumentMgr::GetBase, ITfDocumentMgr::Push


ITfDocumentMgr::Pop

The ITfDocumentMgr::Pop method removes the context at the top of the document stack. Verify that the caller owns the top context before calling this method.

HRESULT Pop(
  DWORD dwFlags
);

Parameters

dwFlags
[in] 0 or TF_POPF_ALL

Return Values

S_OK
The method completed successfully.
E_FAIL
The stack is empty or this method is called without the TF_POPF_ALL constant and only a single context is on the stack.
E_UNEXPECTED
The method is attempting to remove the context during a method notification.

Remarks

This method generates always calls the ITfThreadMgrEventSink::OnPopContext method. In addition to calling the OnPopContext method, the ITfThreadMgrEventSink::OnUninitDocumentMgr is also called after any other notifications if the stacks transitions from one to zero contexts.

When the document owner uninitializes a document manager, the document owner should specify the TF_POPF_ALL flag in the dwFlags parameter. This flag tells the TSF Framework to remove all context on the document and terminate any TSF Text Service user interfaces. Do not use the TF_POPF_ALL flag at any other time.

This method should be called at some time after the ITfDocumentMgr::Push method on the same document manager.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

Miscellaneous Framework Constants, ITfDocumentMgr::Push, ITfThreadMgrEventSink::OnPopContext, ITfThreadMgrEventSink::OnUninitDocumentMgr


ITfDocumentMgr::Push

The ITfDocumentMgr::Push method adds a context to the top of a context stack of a document object.

HRESULT Push(
  ITfContext *pic
);

Parameters

pic
[in] Pointer to the context object obtained from the ITfDocumentMgr::CreateContext method.

Return Values

S_OK
The method completed successfully.
TF_E_STACKFULL
There is no space on the stack for the context. The context stack has a limit of two contexts.
E_UNEXPECTED
The method is attempting to remove the context during an ITfDocumentMgr::Pop notification.

Remarks

This method generates always calls the ITfThreadMgrEventSink::OnPushContext method. In addition to calling the OnPushContext method, the ITfThreadMgrEventSink::OnInitDocumentMgr is also called before any other notifications if the stacks transitions from one to zero contexts.

The ITfDocumentMgr::Pop method should be eventually called on the same document manager after this method

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

Miscellaneous Framework Constants, ITfDocumentMgr::Pop, ITfThreadMgrEventSink::OnPushContext, ITfThreadMgrEventSink::OnInitDocumentMgr


ITfEditRecord

TBD

Methods

ITfEditRecord methods | Description
GetSelectionStatus | TBD
GetTextAndPropertyUpdates | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfEditRecord::GetSelectionStatus

TBD

HRESULT GetSelectionStatus(
  BOOL *pfChanged
);

Parameters

pfChanged
[out] TBD

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfEditRecord::GetTextAndPropertyUpdates

TBD

HRESULT GetTextAndPropertyUpdates(
  DWORD dwFlags,
  const GUID **prgProperties,
  ULONG cProperties,
  IEnumTfRanges **ppEnum
);

Parameters

dwFlags
[in] TBD
prgProperties
[in] TBD
cProperties
[in] TBD
ppEnum
[out] TBD

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfEditSession

TBD

Methods

ITfEditSession methods | Description
DoEditSession | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfEditSession::DoEditSession

TBD

HRESULT DoEditSession(
  TfEditCookie ec
);

Parameters

ec
[in] An edit cookie passed to TFTextStoreImplCookie.

Return Values

S_OK
The method completed successfully.
TF_E_NOLOCK
The cookie in ec is not valid.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfEditTransactionSink

The ITfEditTransactionSink interface is implemented by a TSF Text Service.

Methods in Vtable Order

ITfEditTransactionSink methods | Description
OnStartEditTransaction | TBD
OnEndEditTransaction | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfEditTransactionSink::OnEndEditTransaction

TBD

HRESULT OnEndEditTransaction(
  ITfContext* pic
);

Parameters

pic
[in] TBD

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfEditTransactionSink


ITfEditTransactionSink::OnStartEditTransaction

TBD

HRESULT OnStartEditTransaction(
  ITfContext* pic
);

Parameters

pic
[in] TBD

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfEditTransactionSink


ITfFnAbort

The ITfFnAbort interface is implemented by a TSF Text Service.

TBD

Methods in Vtable Order

ITfFnAbort methods | Description
Abort | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnAbort::Abort

TBD

HRESULT Abort(
  ITfContext* pic
);

Parameters

pic
[in] TBD

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfFnAbort


ITfFnAdviseText

The ITfFnAdviseText interface is implemented by TSF Text Services. TBD

Methods

ITfFnAdviseText methods | Description
OnTextUpdate | TBD
OnLatticeUpdate | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnAdviseText::OnLatticeUpdate

TBD

HRESULT OnLatticeUpdate(
  ITfRange *pRange,
  ITfLMLattice *pLattice
);

Parameters

pRange
[in] TBD
pLattice
[in] TBD

Return Values

This method had no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnAdviseText::OnTextUpdate

TBD

HRESULT OnTextUpdate(
  ITfRange *pRange,
  const WCHAR *pchText,
  LONG cch
);

Parameters

pRange
[in] TBD
pchText
[in] TBD
cch
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnBalloon

TBD

Methods

ITfFnBalloon methods | Description
UpdateBalloon | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnBalloon::UpdateBalloon

TBD

HRESULT UpdateBalloon(
  TfLBBalloonStyle style,
  const WCHAR *pch,
  ULONG cch
);

Parameters

style
[in] TBD
pch
[in] TBD
cch
[in] TBD

Return Values

This method had no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnConfigure

The ITfFnConfigure interface is implemented by TSF Text Services and is used to show a dialog box. This is done with the one method: Show.

Methods

ITfFnConfigure methods | Description
Show | Shows a modal dialog box.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnConfigure::Show

The ITfFnConfigure::Show method shows a modal dialog box.

HRESULT Show(
  HWND hwndParent,
  LANGID langid,
  REFGUID rguidProfile
);

Parameters

hwndParent
[in] The parent window handle of UI. This can be NULL.
langid
[in] TBD
rguidProfile
[in] TBD

Return Values

S_OK
The configuration UI is shown.

Remarks

ITfFnConfigure::Show does not return until the dialog box is closed.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnConfigureRegisterWord

The ITfFnConfigureRegisterWord interface is implemented by TSF Text Services and is used to show the register word dialog box. This is done through the one method Show.

Methods

ITfFnConfigureRegisterWord methods | Description
Show | Shows the register word dialog box.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnConfigureRegisterWord::Show

The ITfFnConfigureRegisterWord::Show method shows the register word dialog box. If the parameter bstrRegistered is not NULL, the register word dialog box uses this string as a default registered string.

HRESULT Show(
  HWND hwndParent,
  LANGID langid,
  REFGUID rguidProfile,
  BSTR bstrRegistered
);

Parameters

hwndParent
[in] The parent window handle of UI. This can be NULL.
langid
[in] TBD
rguidProfile
[in] TBD
bstrRegistered
[in] The string to be registered to the dictionary. This is optional and it can be NULL. If this is NULL, the default register word dialog box is shown.

Return Values

S_OK
The configuration UI is shown.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnGetSAPIObject

The ITfFnGetSAPIObject interface is implemented by a Speech API (SAPI) layer TSF Text Service, and returns a SAPI object.

Methods

ITfFnGetSAPIObject methods | Description
Get | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnGetSAPIObject::Get

TBD

HRESULT Get(
  TfSapiObject sObj,
  IUnknown **ppunk
);

Parameters

sObj
[in] TBD
ppunk
[out] TBD

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnLangProfileUtil

The ITfLangProfileUtil interface is implemented by a TSF Text Service.

Methods in Vtable Order

ITfFnLangProfileUtil methods | Description
RegisterActiveProfiles | TBD
IsProfileAvailableForLang | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnLangProfileUtil::IsProfileAvailableForLang

TBD

HRESULT IsProfileAvailableForLang(
  LANGID langid,
  BOOL* pfAvailable
);

Parameters

langid
[in] TBD
pfAvailable
[out] TBD

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfFnLangProfileUtil


ITfFnLangProfileUtil::RegisterActiveProfiles

TBD

HRESULT RegisterActiveProfiles(void);

Parameters

This method has no parameters.

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfFnLangProfileUtil


ITfFnLMInternal

The ITfFnLMInternal interface is implemented by TSF Text Services. TBD

Methods

ITfFnLMInternal methods | Description
ProcessLattice | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnLMInternal::ProcessLattice

TBD

HRESULT ProcessLattice(
  ITfRange *pRange
);

Parameters

pRange
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnLMProcessor

The ITfFnLMProcessor interface is implemented by TSF Text Services. TBD

Methods

ITfFnLMProcessor methods | Description
QueryRange | Has essentially the same function as ITfFnReconversion::QueryConvert.
QueryLangID | Used by a LM TSF Text Service client to ensure its language ID is acceptable for the LM reconversion process.
GetReconversion | TBD
Reconvert | Identical to ITfFnReconversion::GetReconversion.
QueryKey | TBD
InvokeKey | Called by the client TSF Text Service to let the LM text service perform a default action of the key specified.
InvokeFunc | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnLMProcessor::GetReconversion

TBD

HRESULT GetReconversion(
  ITfRange *pRange,
  ITfCandidateList **ppCandList
);

Parameters

pRange
[in] Specifies a range for the LM TSF Text Service to perform reconversion.
ppCandList
[out] A buffer to receive a list of alternates for the range.

Return Values

S_OK
The method has completed successfully.

Remarks

This method is identical to ITfFnReconversion::GetReconversion. A client TSF Text Service may be called for the lattice property request during this call.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnLMProcessor::InvokeFunc

TBD

HRESULT InvokeFunc(
  ITfContext *pic,
  REFGUID refguidFunc
);

Parameters

pic
[in] Pointer to ITfContext.
refguidFunc
[in] Specifies function GUID to be invoked.

Return Values

S_OK
The method has completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnLMProcessor::InvokeKey

The ITfFnLMProcessor::InvokeKey method is called by the client TSF Text Service to let the LM TSF Text Service perform a default action of the key specified.

HRESULT InvokeKey(
  BOOL fUp,
  WPARAM vKey,
  LPARAM lparamKeyData
);

Parameters

fUp
[in] Specifies whether vKey is an upstroke (WM_KEYUP) or down stroke (WM_KEYDOWN)
vKey
[in] Specifies a virtual key to invoke.
lparamKeyData
[in] Specifies information associated with a keystroke, such as repeat count, scan code and so on. This parameter specifies exactly the same data format that WM_KEYxxx messages include in their lParam.

Return Values

S_OK
The method has completed successfully.

Remarks

An example of ITfFnLMProcessor::InvokeKey notifies the LM TSF Text Service of VK_CONVERT to perform reconversion on the range that includes the current selection.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnLMProcessor::QueryKey

TBD

HRESULT QueryKey(
  BOOL fUp,
  WPARAM vKey,
  LPARAM lparamKeydata,
  BOOL *pfInterested
);

Parameters

fUp
[in] TBD
vKey
[in] TBD
lparamKeydata
[in] TBD
pfInterested
[out] TBD

Return Values

S_OK
The method has completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnLMProcessor::QueryLangID

The ITfFnLMProcessor::QueryLangID method is used by a LM TSF Text Service client to ensure its language ID is acceptable for the LM reconversion process.

HRESULT QueryLangID(
  LANGID langid,
  BOOL *pfAccepted
);

Parameters

langid
[in] Specifies a langid to ask if the LM TSF Text Service can process it.
pfAccepted
[out] Receives whether the langid is acceptable for the LM TSF Text Service.

Return Values

S_OK
The method has completed successfully.

Remarks

If a client can possibly generate more than one language ID of text, it should query all with this method.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnLMProcessor::QueryRange

The ITfFnLMProcessor::QueryRange method has essentially the same function to ITfFnReconversion::QueryConvert. A TSF Text Service receiving a request for reconversion can call ITfFnLMProcessor::QueryReconvert first when the LM TSF Text Service is present.

HRESULT QueryRange(
  ITfRange *pRange,
  ITfRange **ppNewRange,
  BOOL *pfAccepted
);

Parameters

pRange
[in] A range for the LM TSF Text Service to perform reconversion.
ppNewRange
[out] Receives an adjusted range for reconversion.
pfAccepted
[out] TBD

Return Values

S_OK
The method has completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnLMProcessor::Reconvert

The ITfFnLMProcessor::Reconvert method is identical to ITfFnReconversion::GetReconversion. The LM TSF Text Service starts a candidate UI session and starts interacting with TSF Text Services to request lattice data.

HRESULT Reconvert(
  ITfRange *pRange
);

Parameters

pRange
[in] Specifies a range for the LM TSF Text Service to perform reconversion.

Return Values

S_OK
The method has completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnPlayBack

The ITfFnPlayBack interface is optionally implemented by a TSF Text Service. TBD

Methods

ITfFnPlayBack methods | Description
QueryRange | Tests for PlayBack of the specified range.
Play | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnPlayBack::Play

TBD

HRESULT Play(
  ITfRange *pRange
);

Parameters

pRange
[in] The pointer to ITfRange interface of the PlayBack target.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnPlayBack::QueryRange

The ITfFnPlayBack::QueryRange method tests for PlayBack of the specified range.

HRESULT QueryRange(
  ITfRange *pRange,
  ITfRange **ppNewRange,
  BOOL *pfPlayable
);

Parameters

pRange
[in] The pointer to ITfRange interface of the PlayBack target.
ppNewRange
[out] On exit, the adjusted range by the function. If this parameter is NULL, the function cannot adjust the range. However, the function can evaluate if the target range can be reconverted or not.
pfPlayable
[out] TBD

Return Values

This method has no return values.

Remarks

ITfFnPlayBack::QueryRange can adjust the range as returned in ppNewRange. If ppNewRange is NULL, TSF Text Services are not allowed to adjust the range.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnPropertyUIStatus

The ITfFnPropertyUIStatus interface is implemented by a TSF Text Service.

Methods in Vtable Order

ITfFnPropertyUIStatus methods | Description
GetStatus | TBD
SetStatus | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnPropertyUIStatus::GetStatus

TBD

HRESULT GetStatus(
  REFGUID refguidProp,
  DWORD* pdw
);

Parameters

refguidProp
[in] TBD
pdw
[out] TBD

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfFnPropertyUIStatus


ITfFnPropertyUIStatus::SetStatus

TBD

HRESULT SetStatus(
  REFGUID refguidProp,
  DWORD dw
);

Parameters

refguidProp
[in] TBD
dw
[in] TBD

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfFnPropertyUIStatus


ITfFnReconversion

The ITfFnReconversion interface is implemented by a TSF Text Service. TBD

Methods

ITfFnReconversion methods | Description
QueryRange | Tests for reconversion of the specified range.
GetReconversion | TBD
Reconvert | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnReconversion::GetReconversion

TBD

HRESULT GetReconversion(
  ITfRange *pRange,
  ITfCandidateList **ppCandList
);

Parameters

pRange
[in] The pointer to ITfRange interface of the reconversion target.
ppCandList
[out] On exit, contains ITfCandidateList interface pointer.

Return Values

S_OK
The method completed successfully.

Remarks

ITfFnReconversion::GetReconversion does not show the correction UI but the application can retrieve the ITfCandidateList interface.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnReconversion::QueryRange

The ITfFnReconversion::QueryRange method tests for reconversion of the specified range.

HRESULT QueryRange(
  ITfRange *pRange,
  ITfRange **ppNewRange,
  BOOL *pfConvertable
);

Parameters

pRange
[in] Pointer to ITfRange interface of the reconversion target.
ppNewRange
[in, out] On exit, the adjusted range by the function. If this parameter is NULL, the function cannot adjust the range. However, the function can evaluate if the target range can be reconverted or not.
pfConvertable
[out] TBD

Return Values

This method has no return values.

Remarks

ITfFnReconversion::QueryRange can adjust the range as returned in ppNewRange. If ppNewRange is NULL, TSF Text Services are not allowed to adjust the range.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnReconversion::Reconvert

TBD

HRESULT Reconvert(
  ITfRange *pRange
);

Parameters

pRange
[in] Pointer to ITfRange interface of the reconversion target.

Return Values

S_OK
The method completed successfully.

Remarks

This method does not adjust the pRange to reconvert.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnShowHelp

The ITfFnShowHelp interface is implemented by TSF Text Services and is used to show the register word dialog box. This is done through the one method Show.

Methods

ITfFnShowHelp methods | Description
Show | Shows the register word dialog box.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFnShowHelp::Show

The ITfFnShowHelp::Show method shows the register word dialog box. If the parameter bstrRegistered is not NULL, the register word dialog box uses this string as a default registered string.

HRESULT Show(
  HWND hwndParent
);

Parameters

hwndParent
[in] The parent window handle of UI. This can be NULL.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfFunction

The ITfFunction interface is implemented by a TSF Text Service. The individual function interfaces are derived from this interface.

Methods

ITfFunction methods | Description
GetDisplayName | Gets the display name.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfFunction::GetDisplayName

The ITfFunction::GetDisplayName method gets the display name.

HRESULT GetDisplayName(
  BSTR *pbstrName
);

Parameters

pbstrName
[out] On exit, contains the string to the display name.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfFunctionProvider

The ITfFunctionProvider interface is implemented by a TSF Text Service.

Methods

ITfFunctionProvider methods | Description
GetType | TBD
GetDescription | TBD
GetFunction | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfFunctionProvider::GetDescription

TBD

HRESULT GetDescription(
  BSTR *pbstrDesc
);

Parameters

pbstrDesc
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfFunctionProvider::GetFunction

TBD

HRESULT GetFunction(
  REFGUID rguid,
  REFIID riid,
  IUnknown **ppunk
);

Parameters

rguid
[in] TBD
riid
[in] TBD
ppunk
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfFunctionProvider::GetType

TBD

HRESULT GetType(
  GUID *pguid
);

Parameters

pguid
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInputProcessorProfiles

The ITfInputProcessorProfiles interface is implemented by Text Services Framework. TBD

Methods

ITfInputProcessorProfiles methods | Description
Register | TBD
Unregister | TBD
AddLanguageProfile | TBD
RemoveLanguageProfile | TBD
EnumInputProcessorInfo | TBD
GetDefaultLanguageProfile | TBD
SetDefaultLanguageProfile | TBD
ActivateLanguageProfile | TBD
GetActiveLanguageProfile | TBD
GetLanguageProfileDescription | TBD
GetCurrentLanguage | TBD
ChangeCurrentLanguage | TBD
GetLanguageList | TBD
EnumLanguageProfiles | TBD
EnableLanguageProfile | TBD
IsEnabledLanguageProfile | TBD
EnableLanguageProfileByDefault | TBD
SubstituteKeyboardLayout | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInputProcessorProfiles::ActivateLanguageProfile

TBD

HRESULT ActivateLanguageProfile(
  REFCLSID rclsid,
  LANGID langid,
  REFGUID guidProfiles
);

Parameters

rclsid
[in] TBD
langid
[in] TBD
guidProfiles
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInputProcessorProfiles::AddLanguageProfile

TBD

HRESULT AddLanguageProfile(
  REFCLSID rclsid,
  LANGID langid,
  REFGUID guidProfile,
  const WCHAR *pchDesc,
  ULONG cchDesc,
  const WCHAR *pchIconFile,
  ULONG cchFile,
  ULONG uIconIndex
);

Parameters

rclsid
[in] TBD
langid
[in] TBD
guidProfile
[in] TBD
pchDesc
[in] TBD
cchDesc
[in] TBD
pchIconFile
[in] TBD
cchFile
[in] TBD
uIconIndex
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInputProcessorProfiles::ChangeCurrentLanguage

TBD

HRESULT ChangeCurrentLanguage(
  LANGID langid
);

Parameters

langid
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInputProcessorProfiles::EnableLanguageProfile

TBD

HRESULT EnableLanguageProfile(
  REFCLSID rclsid,
  LANGID langid,
  REFGUID guidProfile,
  BOOL fEnable
);

Parameters

rclsid
[in] TBD
langid
[in] TBD
guidProfile
[in] TBD
fEnable
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInputProcessorProfiles::EnableLanguageProfileByDefault

TBD

HRESULT EnableLanguageProfileByDefault(
  REFCLSID rclsid,
  LANGID langid,
  REFGUID guidProfile,
  BOOL fEnable
);

Parameters

rclsid
[in] TBD
langid
[in] TBD
guidProfile
[in] TBD
fEnable
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInputProcessorProfiles::EnumInputProcessorInfo

TBD

HRESULT EnumInputProcessorInfo(
  IEnumGUID **ppEnum
);

Parameters

ppEnum
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInputProcessorProfiles::EnumLanguageProfiles

TBD

HRESULT EnumLanguageProfiles(
  LANGID langid,
  IEnumTfLanguageProfiles **ppEnum
);

Parameters

langid
[in] TBD
ppEnum
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInputProcessorProfiles::GetActiveLanguageProfile

TBD

HRESULT GetActiveLanguageProfile(
  REFCLSID rclsid,
  LANGID *plangid,
  GUID *pguidProfile
);

Parameters

rclsid
[in] TBD
plangid
[out] TBD
pguidProfile
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInputProcessorProfiles::GetCurrentLanguage

TBD

HRESULT GetCurrentLanguage(
  LANGID *plangid
);

Parameters

plangid
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInputProcessorProfiles::GetDefaultLanguageProfile

TBD

HRESULT GetDefaultLanguageProfile(
  LANGID langid,
  REFGUID catid,
  CLSID *pclsid,
  GUID *pguidProfile
);

Parameters

langid
[in] TBD
catid
[in] TBD
pclsid
[out] TBD
pguidProfile
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInputProcessorProfiles::GetLanguageList

TBD

HRESULT GetLanguageList(
  LANGID **ppLangId,
  ULONG *pulCount
);

Parameters

ppLangId
[out] TBD
pulCount
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInputProcessorProfiles::GetLanguageProfileDescription

TBD

HRESULT GetLanguageProfileDescription(
  REFCLSID rclsid,
  LANGID langid,
  REFGUID guidProfile,
  BSTR *pbstrProfile
);

Parameters

rclsid
[in] TBD
langid
[in] TBD
guidProfile
[in] TBD
pbstrProfile
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInputProcessorProfiles::IsEnabledLanguageProfile

TBD

HRESULT IsEnabledLanguageProfile(
  REFCLSID rclsid,
  LANGID langid,
  REFGUID guidProfile,
  BOOL pfEnable
);

Parameters

rclsid
[in] TBD
langid
[in] TBD
guidProfile
[in] TBD
pfEnable
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInputProcessorProfiles::Register

TBD

HRESULT Register(
  REFCLSID rclsid
);

Parameters

rclsid
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInputProcessorProfiles::RemoveLanguageProfile

TBD

HRESULT RemoveLanguageProfile(
  REFCLSID rclsid,
  LANGID langid,
  REFGUID guidProfile
);

Parameters

rclsid
[in] TBD
langid
[in] TBD
guidProfile
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInputProcessorProfiles::SetDefaultLanguageProfile

TBD

HRESULT SetDefaultLanguageProfile(
  LANGID langid,
  REFCLSID rclsid,
  REFGUID guidProfile
);

Parameters

langid
[in] TBD
rclsid
[in] TBD
guidProfile
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInputProcessorProfiles::SubstituteKeyboardLayout

TBD

HRESULT SubstituteKeyboardLayout(
  REFCLSID rclsid,
  LANGID langid,
  REFGUID guidProfile,
  HKL hKL
);

Parameters

rclsid
[in] TBD
langid
[in] TBD
guidProfile
[in] TBD
hKL
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInputProcessorProfiles::Unregister

TBD

HRESULT Unregister(
  REFCLSID rclsid
);

Parameters

rclsid
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInsertAtSelection

The ITfInsertAtSelection interface is implemented by Text Services Framework (TSF).

Methods in Vtable Order

ITfInsertAtSelection methods | Description
InsertTextAtSelection | TBD
InsertEmbeddedAtSelection | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfInsertAtSelection::InsertEmbeddedAtSelection

The ITfInsertAtSelection::InsertEmbeddedAtSelection method inserts an IDataObject object at the selection or insertion point.

HRESULT InsertEmbeddedAtSelection(
  TfEditCookie ec,
  DWORD dwFlags,
  IDataObject* pDataObject,
  ITfRange** ppRange
);

Parameters

ec
[in] Edit cookie with read or write access, depending on the value of the dwFlags parameter.
dwFlags
[in] Bit field with one of the following values:

TF_IAS_NOQUERY

The ppRange parameter will be NULL on exit.

TF_IAS_QUERYONLY

Context is not modified but the ppRange parameter is set as if the insert had taken place. Read access is sufficient. If this flag is not set, the ec parameter must have write access.

TF_IAS_NO_DEFAULT_COMPOSITION

The TSF Text Framework will not create a default composition if a composition is needed. The caller must creat a composition object that covers the inserted text before releasing the context lock.

pDataObject
[in] Pointer to object to insert.
ppRange
[out] Position of the inserted object. Optional.

Return Values

S_OK
The method completed successfully.
TF_E_NOLOCK
The ec parameter is an invalid edit cookie.
TF_E_DISCONNECTED
Context object is not on a document stack.
TS_E_NOSELECTION
Context has no selection.
TS_E_READONLY
Selection is read-only.
TF_E_FORMAT
Context owner cannot handle objects of the type provided by the pDataObject parameter.

Remarks

Callers can use the ITfQueryEmbedded::QueryInsertEmbedded method to determine if a particular object type is likely to be accepted by this method.

To insert a text instead of a IDataObject object, use the ITfInsertAtSelection::InsertTextAtSelection method.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfInsertAtSelection , IDataObject


ITfInsertAtSelection::InsertTextAtSelection

The ITfInsertAtSelection::InsertTextAtSelection method inserts text at the selection or insertion point.

HRESULT InsertTextAtSelection(
  TfEditCookie ec,
  DWORD dwFlags,
  const WCHAR* pchText,
  LONG cch,
  ITfRange** ppRange
);

Parameters

ec
[in] Edit cookie with read or write access, depending on the value of the dwFlags parameter.
dwFlags
[in] Bit field with one of the following values:

TF_IAS_NOQUERY

The ppRange parameter will be NULL on exit.

TF_IAS_QUERYONLY

Context is not modified but the ppRange parameter is set as if the insert had taken place. Read access is sufficient. If this flag is not set, the ec parameter must have write access.

TF_IAS_NO_DEFAULT_COMPOSITION

The TSF Text Framework will not create a default composition if a composition is needed. The caller must creat a composition object that covers the inserted text before releasing the context lock.

pchText
[in] Text to insert
cch
[in] WCHAR count of text to insert.
ppRange
[out] Position of the inserted object. Optional.

Return Values

S_OK
The method completed successfully.
TF_E_NOLOCK
The ec parameter is an invalid edit cookie.
TF_E_DISCONNECTED
Context object is not on a document stack.
TS_E_NOSELECTION
Context has no selection.
TS_E_READONLY
Selection is read-only.

Remarks

To insert an IDataObject object instead of text, use the ITfInsertAtSelection::InsertEmbeddedAtSelection method.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfInsertAtSelection


ITfKeyEventSink

The ITfKeyEventSink interface is implemented by TSF Text Services and is used by TSF Text Services to get key events. This interface allows TSF Text Services to receive keyboard focus and Text Service notifications.

Methods

ITfKeyEventSink methods | Description
OnSetFocus | TBD
OnTestKeyDown | TBD
OnTestKeyUp | TBD
OnKeyDown | TBD
OnKeyUp | TBD
OnPreservedKey | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeyEventSink::OnKeyDown

The ITfKeyEventSink::OnKeyDown method

HRESULT OnKeyDown(
  ITfContext *pic,
  WPARAM wParam,
  LPARAM lParam,
  BOOL *pfEaten
);

Parameters

pic
[in] Pointer to the target input context
wParam
[in] Specifies the virtual key code of the nonsystem key.
lParam
[in] Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag. This parameter can be one or more of the following values.
Value | Description
0-15 | Specifies the repeat count. The value is the number of times the keystroke is repeated as a result of the user's holding down the key
16–23 | Specifies the scan code. The value depends on the original equipment manufacturer (OEM).
24 | Specifies whether the key is an extended key, such as a function key or a key on the numeric keypad. The value is 1 if the key is an extended key; otherwise, it is 0.
25-28 | Reserved
29 | Specifies the context code. The value is 1 if the ALT key is down; otherwise, it is 0.
30 | Specifies the previous key state. The value is 1 if the key is down before the message is sent; it is 0 if the key is up.
31 | Specifies the transition state. The value is 0 if the key is being pressed and 1 if it is being released.

For more information about the lParam parameter, see Keystroke Message Flags.

pfEaten
[out] Specifies if the nonsystem key has been handled. If this value is TRUE on exit, the nonsystem key has been handled. If this value is FALSE on exit, the nonsystem key has not been handled.

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeyEventSink::OnKeyUp

TBD

HRESULT OnKeyUp(
  ITfContext *pic,
  WPARAM wParam,
  LPARAM lParam,
  BOOL *pfEaten
);

Parameters

pic
[in] Pointer to the target input context.
wParam
[in] Specifies the virtual key code of the nonsystem key.
lParam
[in] Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag. This parameter can be one or more of the following values.
Value | Description
0-15 | Specifies the repeat count. The value is the number of times the keystroke is repeated as a result of the user's holding down the key
16–23 | Specifies the scan code. The value depends on the original equipment manufacturer (OEM).
24 | Specifies whether the key is an extended key, such as a function key or a key on the numeric keypad. The value is 1 if the key is an extended key; otherwise, it is 0.
25-28 | Reserved
29 | Specifies the context code. The value is 1 if the ALT key is down; otherwise, it is 0.
30 | Specifies the previous key state. The value is 1 if the key is down before the message is sent; it is 0 if the key is up.
31 | Specifies the transition state. The value is 0 if the key is being pressed and 1 if it is being released.

For more information about the lParam parameter, see Keystroke Message Flags.

pfEaten
[out] Specifies if the nonsystem key has been handled. If this value is TRUE on exit, the nonsystem key has been handled. If this value is FALSE on exit, the nonsystem key has not been handled.

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeyEventSink::OnPreservedKey

TBD

HRESULT OnPreservedKey(
  ITfContext *pic,
  REFGUID rguid,
  BOOL *pfEaten
);

Parameters

pic
[in] Pointer to the ITfContext interface.
rguid
[in] Specifies the function GUID to be invoked.
pfEaten
[out] Specifies if the function has been handled. If this value is TRUE on exit, the function has been handled. If this value is FALSE on exit, the function has not been handled.

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeyEventSink::OnSetFocus

The ITfKeyEventSink::OnSetFocus method sets the keyboard focus.

HRESULT OnSetFocus(
  BOOL fForeground
);

Parameters

fForeground
[in] If TRUE, the focus is set. Otherwise the focus is lost.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeyEventSink::OnTestKeyDown

TBD

HRESULT OnTestKeyDown(
  ITfContext *pic,
  WPARAM wParam,
  LPARAM lParam,
  BOOL *pfEaten
);

Parameters

pic
[in] Pointer to target input context.
wParam
[in] Specifies the virtual-key code of the nonsystem key.
lParam
[in] Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag. This parameter can be one or more of the following values.
Value | Description
0-15 | Specifies the repeat count. The value is the number of times the keystroke is repeated as a result of the user's holding down the key
16–23 | Specifies the scan code. The value depends on the original equipment manufacturer (OEM).
24 | Specifies whether the key is an extended key, such as a function key or a key on the numeric keypad. The value is 1 if the key is an extended key; otherwise, it is 0.
25-28 | Reserved
29 | Specifies the context code. The value is 1 if the ALT key is down; otherwise, it is 0.
30 | Specifies the previous key state. The value is 1 if the key is down before the message is sent; it is 0 if the key is up.
31 | Specifies the transition state. The value is 0 if the key is being pressed and 1 if it is being released.

For more information about the lParam parameter, see Keystroke Message Flags.

pfEaten
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeyEventSink::OnTestKeyUp

TBD

HRESULT OnTestKeyUp(
  ITfContext *pic,
  WPARAM wParam,
  LPARAM lParam,
  BOOL *pfEaten
);

Parameters

pic
[in] Pointer to the target input context.
wParam
[in] Specifies the virtual-key code of the nonsystem key.
lParam
[in] Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag. This parameter can be one or more of the following values.
Value | Description
0-15 | Specifies the repeat count. The value is the number of times the keystroke is repeated as a result of the user's holding down the key
16–23 | Specifies the scan code. The value depends on the original equipment manufacturer (OEM).
24 | Specifies whether the key is an extended key, such as a function key or a key on the numeric keypad. The value is 1 if the key is an extended key; otherwise, it is 0.
25-28 | Reserved
29 | Specifies the context code. The value is 1 if the ALT key is down; otherwise, it is 0.
30 | Specifies the previous key state. The value is 1 if the key is down before the message is sent; it is 0 if the key is up.
31 | Specifies the transition state. The value is 0 if the key is being pressed and 1 if it is being released.

For more information about the lParam parameter, see Keystroke Message Flags.

pfEaten
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeystrokeMgr

The ITfKeystrokeMgr interface is implemented by Text Services Framework and is used as a keystroke manager.

Methods

ITfKeystrokeMgr methods | Description
AdviseKeyEventSink | TBD
UnadviseKeyEventSink | TBD
GetForeground | TBD
TestKeyDown | TBD
TestKeyUp | TBD
KeyDown | TBD
KeyUp | TBD
GetPreservedKey | TBD
IsPreservedKey | TBD
PreserveKey | TBD
UnpreserveKey | TBD
SetPreservedKeyDescription | TBD
GetPreservedKeyDescription | TBD
SimulatePreservedKey | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeystrokeMgr::AdviseKeyEventSink

TBD

HRESULT AdviseKeyEventSink(
  TfClientId tid,
  ITfKeyEventSink *pSink,
  BOOL fForeground
);

Parameters

tid
[in] Client identifier that owns the pointer of the ITfKeyEventSink interface.
pSink
[in] Pointer to the ITfKeyEventSink interface to advise the keystroke manager.
fForeground
[in] If TRUE, advise this sink as a foreground KeyEventSink.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeystrokeMgr::GetForeground

TBD

HRESULT GetForeground(
  CLSID *pclsid
);

Parameters

pclsid
[out] Pointer to the TSF Text Services class identifier with the current focus.

Return Values

S_OK
The TSF Text Service has a key event focus.
S_FALSE
The TSF Text Service does not have a key event focus.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeystrokeMgr::GetPreservedKey

TBD

HRESULT GetPreservedKey(
  ITfContext *pic,
  const TF_PRESERVEDKEY *pprekey,
  GUID *pguid
);

Parameters

pic
[in] TBD
pprekey
[in] TBD
pguid
[out] TBD

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeystrokeMgr::GetPreservedKeyDescription

TBD

HRESULT GetPreservedKeyDescription(
  REFGUID rguid,
  BSTR *pbstrDesc
);

Parameters

rguid
[in] TBD
pbstrDesc
[out] TBD

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeystrokeMgr::IsPreservedKey

TBD

HRESULT IsPreservedKey(
  REFGUID rguid,
  const TF_PRESERVEDKEY *pprekey,
  BOOL *pfRegistered
);

Parameters

rguid
[in] TBD
pprekey
[in] TBD
pfRegistered
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeystrokeMgr::KeyDown

TBD

HRESULT KeyDown(
  WPARAM wParam,
  LPARAM lParam,
  BOOL *pfEaten
);

Parameters

wParam
[in] Specifies the virtual key code of the nonsystem key.
lParam
[in] Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag. This parameter can be one or more of the following values.
Value | Description
0-15 | Specifies the repeat count. The value is the number of times the keystroke is repeated as a result of the user's holding down the key
16–23 | Specifies the scan code. The value depends on the original equipment manufacturer (OEM).
24 | Specifies whether the key is an extended key, such as a function key or a key on the numeric keypad. The value is 1 if the key is an extended key; otherwise, it is 0.
25-28 | Reserved
29 | Specifies the context code. The value is 1 if the ALT key is down; otherwise, it is 0.
30 | Specifies the previous key state. The value is 1 if the key is down before the message is sent; it is 0 if the key is up.
31 | Specifies the transition state. The value is 0 if the key is being pressed and 1 if it is being released.

For more information about the lParam parameter, see Keystroke Message Flags.

pfEaten
[out] Specifies if the nonsystem key has been handled. If this value is TRUE on exit, the nonsystem key has been handled. If this value is FALSE on exit, the nonsystem key has not been handled.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeystrokeMgr::KeyUp

TBD

HRESULT KeyUp(
  WPARAM wParam,
  LPARAM lParam,
  BOOL *pfEaten
);

Parameters

wParam
[in] Specifies the virtual key code of the nonsystem key.
lParam
[in] Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag. This parameter can be one or more of the following values.
Value | Description
0-15 | Specifies the repeat count. The value is the number of times the keystroke is repeated as a result of the user's holding down the key
16–23 | Specifies the scan code. The value depends on the original equipment manufacturer (OEM).
24 | Specifies whether the key is an extended key, such as a function key or a key on the numeric keypad. The value is 1 if the key is an extended key; otherwise, it is 0.
25-28 | Reserved
29 | Specifies the context code. The value is 1 if the ALT key is down; otherwise, it is 0.
30 | Specifies the previous key state. The value is 1 if the key is down before the message is sent; it is 0 if the key is up.
31 | Specifies the transition state. The value is 0 if the key is being pressed and 1 if it is being released.

For more information about the lParam parameter, see Keystroke Message Flags.

pfEaten
[out] Specifies on exit if the nonsystem key has been handled. If this value is TRUE, the nonsystem key has been handled. If this value is FALSE, the nonsystem key has not been handled.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeystrokeMgr::PreserveKey

TBD

HRESULT PreserveKey(
  TfClientId tid,
  REFGUID rguid,
  const TF_PRESERVEDKEY *prekey,
  const WCHAR *pchDesc,
  ULONG cchDesc
);

Parameters

tid
[in] TBD
rguid
[in] TBD
prekey
[in] TBD
pchDesc
[in] TBD
cchDesc
[in] TBD

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeystrokeMgr::SetPreservedKeyDescription

TBD

HRESULT SetPreservedKeyDescription(
  REFGUID rguid,
  const WCHAR *pchDesc,
  ULONG cchDesc
);

Parameters

rguid
[in] TBD
pchDesc
[in] TBD
cchDesc
[in] TBD

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeystrokeMgr::SimulatePreservedKey

TBD

HRESULT SimulatePreservedKey(
  ITfContext *pic,
  REFGUID rguid,
  BOOL *pfEaten
);

Parameters

pic
[in] Pointer to the ITfContext object.
rguid
[in] Specifies the function GUID to be invoked.
pfEaten
[out] Specifies on exit if the function has been handled. If this value is TRUE, the function has been handled. If this value is FALSE, the function has not been handled.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeystrokeMgr::TestKeyDown

The ITfKeystrokeMgr::TestKeyDown method checks if the key is handled by the keystroke manager when the application calls the KeyDown method.

HRESULT TestKeyDown(
  WPARAM wParam,
  LPARAM lParam,
  BOOL *pfEaten
);

Parameters

wParam
[in] Specifies the virtual key code of the nonsystem key.
lParam
[in] Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag. This parameter can be one or more of the following values.
Value | Description
0-15 | Specifies the repeat count. The value is the number of times the keystroke is repeated as a result of the user's holding down the key
16–23 | Specifies the scan code. The value depends on the original equipment manufacturer (OEM).
24 | Specifies whether the key is an extended key, such as a function key or a key on the numeric keypad. The value is 1 if the key is an extended key; otherwise, it is 0.
25-28 | Reserved
29 | Specifies the context code. The value is 1 if the ALT key is down; otherwise, it is 0.
30 | Specifies the previous key state. The value is 1 if the key is down before the message is sent; it is 0 if the key is up.
31 | Specifies the transition state. The value is 0 if the key is being pressed and 1 if it is being released.

For more information about the lParam parameter, see Keystroke Message Flags.

pfEaten
[out] Specifies on exit if the nonsystem key has been handled. If this value is TRUE, the nonsystem key has been handled. If this value is FALSE, the nonsystem key has not been handled.

Return Values

S_OK
The method completed successfully.

Remarks

An application can determine if the key is required by the keystroke manager with this method. If this method is successful, then the application can call the KeyDown method. If this method does not return S_OK, then the application does not have to call the KeyDown method.

Use this method for applications that require some time to be ready for text changes. If the application is ready to accept a text change from the message loop, call the KeyDown method without first calling this method to prevent redundant key evaluations by the keystroke manager.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfKeystrokeMgr::KeyUp, ITfKeystrokeMgr::TestKeyUp, ITfKeystrokeMgr::KeyDown


ITfKeystrokeMgr::TestKeyUp

The ITfKeystrokeMgr::TestKeyUp method checks if the key is handled by the keystroke manager when the application calls the Keyup method.

HRESULT TestKeyUp(
  WPARAM wParam,
  LPARAM lParam,
  BOOL *pfEaten
);

Parameters

wParam
[in] Specifies the virtual key code of the nonsystem key.
lParam
[in] Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag. This parameter can be one or more of the following values.
Value | Description
0-15 | Specifies the repeat count. The value is the number of times the keystroke is repeated as a result of the user's holding down the key
16–23 | Specifies the scan code. The value depends on the original equipment manufacturer (OEM).
24 | Specifies whether the key is an extended key, such as a function key or a key on the numeric keypad. The value is 1 if the key is an extended key; otherwise, it is 0.
25-28 | Reserved
29 | Specifies the context code. The value is 1 if the ALT key is down; otherwise, it is 0.
30 | Specifies the previous key state. The value is 1 if the key is down before the message is sent; it is 0 if the key is up.
31 | Specifies the transition state. The value is 0 if the key is being pressed and 1 if it is being released.

For more information about the lParam parameter, see Keystroke Message Flags.

pfEaten
[out] Specifies on exit if the nonsystem key has been handled. If this value is TRUE, the nonsystem key has been handled. If this value is FALSE, the nonsystem key has not been handled.

Return Values

S_OK
The method completed successfully.

Remarks

An application can determine if the key is required by the keystroke manager with this method. If this method is successful, then the application can call the KeyUp method. If this method does not return S_OK, then the application does not have to call the KeyUp method.

Use this method for applications that require some time to be ready for text changes. If the application is ready to accept a text change from the message loop, call the KeyUp method without first calling this method to prevent redundant key evaluations by the keystroke manager.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfKeystrokeMgr::KeyDown, ITfKeystrokeMgr::TestKeyDown, ITfKeystrokeMgr::KeyUp


ITfKeystrokeMgr::UnadviseKeyEventSink

TBD

HRESULT UnadviseKeyEventSink(
  TfClientId tid
);

Parameters

tid
[in] Specifies the client identifier of the sink to be unadvised.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeystrokeMgr::UnpreserveKey

TBD

HRESULT UnpreserveKey(
  REFGUID rguid,
  const TF_PRESERVEDKEY *pprekey
);

Parameters

rguid
[in] TBD
pprekey
[in] TBD

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeyTraceEventSink

The ITfKeyTraceEventSink interface is implemented by a TSF Text Service.

Methods in Vtable Order

ITfKeyTraceEventSink methods | Description
OnKeyTraceDown | TBD
OnKeyTraceUp | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfKeyTraceEventSink::OnKeyTraceDown

TBD

HRESULT OnKeyTraceDown(
  WPARAM wParam,
  LPARAM lParam
);

Parameters

wParam
[in] TBD
lParam
[in] TBD

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfKeyTraceEventSink


ITfKeyTraceEventSink::OnKeyTraceUp

TBD

HRESULT OnKeyTraceUp(
  WPARAM wParam,
  LPARAM lParam
);

Parameters

wParam
[in] TBD
lParam
[in] TBD

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfKeyTraceEventSink


ITfLangBarEventSink

The ITfLangBarEventSink interface is implemented by unified TSF Text Service bars. TBD

Methods

ITfLangBarEventSink methods | Description
OnSetFocus | TBD
OnThreadTerminate | TBD
OnThreadItemChange | TBD
OnModalInput | TBD
ShowFloating | TBD
GetItemFloatingRect | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarEventSink::GetItemFloatingRect

TBD

HRESULT GetItemFloatingRect(
  DWORD dwThreadId,
  REFGUID rguid,
  RECT *prc
);

Parameters

dwThreadId
[in] TBD
rguid
[in] TBD
prc
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarEventSink::OnModalInput

TBD

HRESULT OnModalInput(
  DWORD dwThreadId,
  UINT uMsg,
  WPARAM wParam,
  LPARAM lParam
);

Parameters

dwThreadId
[in] TBD
uMsg
[in] TBD
wParam
[in] TBD
lParam
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarEventSink::OnSetFocus

TBD

HRESULT OnSetFocus(
  DWORD dwThreadId
);

Parameters

dwThreadId
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarEventSink::OnThreadItemChange

TBD

HRESULT OnThreadItemChange(
  DWORD dwThreadId
);

Parameters

dwThreadId
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarEventSink::OnThreadTerminate

TBD

HRESULT OnThreadTerminate(
  DWORD dwThreadId
);

Parameters

dwThreadId
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarEventSink::ShowFloating

TBD

HRESULT ShowFloating(
  DWORD dwFlags
);

Parameters

dwFlags
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItem

The ITfLangBarItem interface is implemented by TSF Text Services. This interface is used to access details of items of a language bar such as the GUID that identifies the item on the toolbar, or the status of the item.

Methods

ITfLangBarItem methods | Description
GetInfo | Returns a structure that holds information about an item on Text Services Framework toolbar.
GetStatus | Gets the status of an item on Text Services Framework toolbar.
Show | TBD
GetTooltipString | Gets a string value that specifies the tool tip of an item on Text Services Framework toolbar.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItem::GetInfo

The ITfLangBarItem::GetInfo method returns a structure that holds information about an item on Text Services Framework toolbar.

HRESULT GetInfo(
  TF_LANGBARITEMINFO *pInfo
);

Parameters

pInfo
[out] Receives a TF_LANGBARITEMINFO structure.

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItem::GetStatus

The ITfLangBarItem::GetStatus method gets the status of an item on Text Services Framework toolbar.

HRESULT GetStatus(
  DWORD *pdwStatus
);

Parameters

pdwStatus
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItem::GetTooltipString

The ITfLangBarItem::GetTooltipString method gets a string value that specifies the tool tip of an item on Text Services Framework toolbar.

HRESULT GetTooltipString(
  BSTR *pbstrToolTip
);

Parameters

pbstrToolTip
[out] String value that specifies the tool tip of an item on Text Services Framework toolbar.

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItem::Show

TBD

HRESULT Show(
  BOOL fShow
);

Parameters

fShow
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemBalloon

The ITfLangBarItemBalloon interface is implemented by TSF Text Services. TBD

Methods

ITfLangBarItemBalloon methods | Description
OnClick | TBD
GetPreferredSize | TBD
GetBalloonInfo | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemBalloon::GetBalloonInfo

TBD

HRESULT GetBalloonInfo(
  TF_LBBALLOONINFO *pInfo
);

Parameters

pInfo
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemBalloon::GetPreferredSize

TBD

HRESULT GetPreferredSize(
  const SIZE *pszDefault,
  SIZE *psz
);

Parameters

pszDefault
[in] TBD
psz
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemBalloon::OnClick

TBD

HRESULT OnClick(
  TfLBIClick click,
  POINT pt,
  const RECT *prcArea
);

Parameters

click
[in] TBD
pt
[in] TBD
prcArea
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemBitmap

The ITfLangBarItemBitmap interface is implemented by TSF Text Services. TBD

Methods

ITfLangBarItemBitmap methods | Description
OnClick | TBD
GetPreferredSize | TBD
DrawBitmap | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemBitmap::DrawBitmap

TBD

HRESULT DrawBitmap(
  LONG bmWidth,
  LONG bmHeight,
  DWORD dwFlags,
  HBITMAP *phbmp,
  HBITMAP *phbmpMask
);

Parameters

bmWidth
[in] TBD
bmHeight
[in] TBD
dwFlags
[in] TBD
phbmp
[out] TBD
phbmpMask
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemBitmap::GetPreferredSize

TBD

HRESULT GetPreferredSize(
  const SIZE *pszDefault,
  SIZE *psz
);

Parameters

pszDefault
[in] TBD
psz
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemBitmap::OnClick

TBD

HRESULT OnClick(
  TfLBIClick click,
  POINT pt,
  const RECT *prcArea
);

Parameters

click
[in] TBD
pt
[in] TBD
prcArea
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemBitmapButton

The ITfLangBarItemBitmapButton interface is implemented by TSF Text Services. TBD

Methods

ITfLangBarItemBitmapButton methods | Description
OnClick | TBD
InitMenu | TBD
OnMenuSelect | TBD
GetPreferredSize | TBD
DrawBitmap | TBD
GetText | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemBitmapButton::DrawBitmap

TBD

HRESULT DrawBitmap(
  LONG bmWidth,
  LONG bmHeight,
  DWORD dwFlags,
  HBITMAP *phbmp,
  HBITMAP *phbmpMask
);

Parameters

bmWidth
[in] TBD
bmHeight
[in] TBD
dwFlags
[in] TBD
phbmp
[out] TBD
phbmpMask
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemBitmapButton::GetPreferredSize

TBD

HRESULT GetPreferredSize(
  const SIZE *pszDefault,
  SIZE *psz
);

Parameters

pszDefault
[in] TBD
psz
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemBitmapButton::GetText

TBD

HRESULT GetText(
  BSTR *pbstrText
);

Parameters

pbstrText
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemBitmapButton::InitMenu

TBD

HRESULT InitMenu(
  ITfLangBarItemMenu *pMenu
);

Parameters

pMenu
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemBitmapButton::OnClick

TBD

HRESULT OnClick(
  TfLBIClick click,
  POINT pt,
  const RECT *prcArea
);

Parameters

click
[in] TBD
pt
[in] TBD
prcArea
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemBitmapButton::OnMenuSelect

TBD

HRESULT OnMenuSelect(
  UINT wID
);

Parameters

wID
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemButton

The ITfLangBarItemButton interface is implemented by TSF Text Services. This interface is used to manage a language bar button.

Methods

ITfLangBarItemButton methods | Description
OnClick | TBD
InitMenu | TBD
OnMenuSelect | TBD
GetIcon | TBD
GetText | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemButton::GetIcon

TBD

HRESULT GetIcon(
  HICON *phIcon
);

Parameters

phIcon
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemButton::GetText

TBD

HRESULT GetText(
  BSTR *pbstrText
);

Parameters

pbstrText
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemButton::InitMenu

TBD

HRESULT InitMenu(
  ITfLangBarItemMenu *pMenu
);

Parameters

pMenu
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemButton::OnClick

TBD

HRESULT OnClick(
  TfLBIClick click,
  POINT pt,
  const RECT *prcArea
);

Parameters

click
[in] TBD
pt
[in] TBD
prcArea
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemButton::OnMenuSelect

TBD

HRESULT OnMenuSelect(
  UINT wID
);

Parameters

wID
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemMgr

The ITfLangBarItemMgr interface is implemented by Text Services Framework and is used to manage items in a language bar. You can add or remove items, get items, or enumerate items in the language bar using this interface.

Methods

ITfLangBarItemMgr methods | Description
EnumItems | Enumerates the items in the language bar.
GetItem | Gets an item in the language bar.
AddItem | Adds an item to the language bar.
RemoveItem | Removes an item from the language bar.
AdviseItemSink | TBD
UnadviseItemSink | TBD
GetItemFloatingRect | TBD
GetItemsStatus | TBD
GetItemNum | TBD
GetItems | TBD
AdviseItemsSink |
UnadviseItemsSink | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemMgr::AddItem

The ITfLangBarItemMgr::AddItem method adds an item to the language bar.

HRESULT AddItem(
  ITfLangBarItem *punk
);

Parameters

punk
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemMgr::AdviseItemSink

TBD

HRESULT AdviseItemSink(
  ITfLangBarItemSink *punk,
  DWORD *pdwCookie,
  REFGUID rguidItem
);

Parameters

punk
[in] TBD
pdwCookie
[out] TBD
rguidItem
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemMgr::AdviseItemsSink

TBD

HRESULT AdviseItemsSink(
  ULONG ulCount,
  ITfLangBarItemSink** ppunk,
  const GUID* pguidItem,
  DWORD* pdwCookie
);

Parameters

ulCount
[in] TBD
ppunk
[in] TBD
pguidItem
[in] TBD
pdwCookie
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemMgr::EnumItems

The ITfLangBarItemMgr::EnumItems method enumerates the items in the language bar.

HRESULT EnumItems(
  IEnumTfLangBarItems **ppEnum
);

Parameters

ppEnum
[out] Receives a pointer to a language bar enumerator object.

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemMgr::GetItem

The ITfLangBarItemMgr::GetItem method gets an item in the language bar.

HRESULT GetItem(
  REFGUID rguid,
  ITfLangBarItem **ppItem
);

Parameters

rguid
[in] TBD
ppItem
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemMgr::GetItemFloatingRect

TBD

HRESULT GetItemFloatingRect(
  DWORD dwThreadId,
  REFGUID rguid,
  RECT* prc
);

Parameters

dwThreadId
[in] TBD
rguid
[in] TBD
prc
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemMgr::GetItemNum

TBD

HRESULT GetItemNum(
  ULONG *pulCount
);

Parameters

pulCount
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemMgr::GetItems

TBD

HRESULT GetItems(
  ULONG ulCount,
  ITfLangBarItem** ppItem,
  TF_LANGBARITEMINFO* pInfo,
  DWORD* pdwStatus,
  ULONG *pcFetched
);

Parameters

ulCount
[in] TBD
ppItem
[out] TBD
pInfo
[in, out] TBD
pdwStatus
[in, out] TBD
pcFetched
[in, out, unique] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemMgr::GetItemsStatus

TBD

HRESULT GetItemsStatus(
  ULONG ulCount,
  const GUID* prgguid,
  DWORD *pdwStatus
);

Parameters

ulCount
[in] TBD
prgguid
[in] TBD
pdwStatus
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemMgr::RemoveItem

The ITfLangBarItemMgr::RemoveItem method removes an item from the language bar.

HRESULT RemoveItem(
  ITfLangBarItem *punk
);

Parameters

punk
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemMgr::UnadviseItemSink

TBD

HRESULT UnadviseItemSink(
  DWORD dwCookie
);

Parameters

dwCookie
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemMgr::UnadviseItemsSink

TBD

HRESULT UnadviseItemsSink(
  ULONG ulCount,
  DWORD* pdwCookie
);

Parameters

ulCount
[in] TBD
pdwCookie
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemSink

The ITfLangBarItemSink interface is implemented by Text Services Framework. TBD

Methods

ITfLangBarItemSink methods | Description
OnUpdate | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarItemSink::OnUpdate

TBD

HRESULT OnUpdate(void);

Parameters

This method had no parameters.

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarMgr

The ITfLangBarMgr interface is implemented by Text Services Framework, and is used by TSF Text Services. TBD

Methods

ITfLangBarMgr methods | Description
AdviseEventSink | TBD
UnadviseEventSink | TBD
GetThreadMarshalInterface | TBD
GetThreadLangBarItemMgr | TBD
GetInputProcessorProfiles | TBD
RestoreLastFocus | TBD
SetModalInput | TBD
ShowFloating | TBD
GetShowFloatingStatus | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarMgr::AdviseEventSink

TBD

HRESULT AdviseEventSink(
  ITfLangBarEventSink *pSink,
  HWND hwnd,
  DWORD dwFlags,
  DWORD *pdwCookie
);

Parameters

pSink
[in] TBD
hwnd
[in] TBD
dwFlags
[in] TBD
pdwCookie
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarMgr::GetInputProcessorProfiles

TBD

HRESULT GetInputProcessorProfiles(
  DWORD dwThreadId,
  ITfInputProcessorProfiles **ppaip,
  DWORD *pdwThreadid
);

Parameters

dwThreadId
[in] TBD
ppaip
[out] TBD
pdwThreadid
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarMgr::GetShowFloatingStatus

TBD

HRESULT GetShowFloatingStatus(
  DWORD *dwFlags
);

Parameters

dwFlags
TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarMgr::GetThreadLangBarItemMgr

TBD

HRESULT GetThreadLangBarItemMgr(
  DWORD dwThreadId,
  ITfLangBarItemMgr **pplbi,
  DWORD *pdwThreadid
);

Parameters

dwThreadId
[in] TBD
pplbi
[out] TBD
pdwThreadid
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarMgr::GetThreadMarshalInterface

TBD

HRESULT GetThreadMarshalInterface(
  DWORD dwThreadId,
  DWORD dwType,
  REFIID riid,
  IUnknown **ppunk
);

Parameters

dwThreadId
[in] TBD
dwType
[in] TBD
riid
[in] TBD
ppunk
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarMgr::RestoreLastFocus

TBD

HRESULT RestoreLastFocus(
  DWORD *pdwThreadId,
  BOOL fPrev
);

Parameters

pdwThreadId
TBD
fPrev
TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarMgr::SetModalInput

TBD

HRESULT SetModalInput(
  ITfLangBarEventSink *pSink,
  DWORD dwThreadId,
  DWORD dwFlags
);

Parameters

pSink
[in] TBD
dwThreadId
[in] TBD
dwFlags
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarMgr::ShowFloating

TBD

HRESULT ShowFloating(
  DWORD dwFlags
);

Parameters

dwFlags
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLangBarMgr::UnadviseEventSink

TBD

HRESULT UnadviseEventSink(
  DWORD dwCookie
);

Parameters

dwCookie
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfLanguageProfileNotifySink

The ITfLanguageProfileNotifySink interface is implemented by an application to receive notifications when a language profile changes.

Methods

ITfLanguageProfileNotifySink methods | Description
OnLanguageChange | Invoked when display a language profile changes.
OnLanguageChanged | Invoked when display a language profile has changed.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfLanguageProfileNotifySink::OnLanguageChange

The ITfLanguageProfileNotifySink::OnLanguageChange method is invoked when display a language profile changes.

HRESULT OnLanguageChange(
  LANGID langid,
  BOOL *pfAccept
);

Parameters

langid
[in] TBD
pfAccept
[out] TBD

Return Values

This method has no parameters.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfLanguageProfileNotifySink::OnLanguageChanged

The ITfLanguageProfileNotifySink::OnLanguageChanged method is invoked when display a language profile has changed.

HRESULT OnLanguageChanged(void);

Parameters

This method has no parameters.

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfLMLattice

The ITfLMLattice interface is implemented by TSF Text Services. All ITfLMLattice implementations need to support the TF_LMLATTELEMENT structure.

Methods

ITfLMLattice methods | Description
QueryType | Queries if a specific lattice element type can be support by the lattice implementation.
EnumLatticeElements | Initializes to the default TFLMLATTELEMENT enumerator.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfLMLattice::EnumLatticeElements

The ITfLMLattice::EnumLatticeElements method initializes to the default TFLMLATTELEMENT enumerator.

HRESULT EnumLatticeElements(
  DWORD dwFrameStart,
  REFGUID rguidType,
  IEnumTfLatticeElements **ppEnum
);

Parameters

dwFrameStart
[in] TBD
rguidType
[in] TBD
ppEnum
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfLMLattice::QueryType

The ITfLMLattice::QueryType method queries if a specific lattice element type can be support by the lattice implementation.

HRESULT QueryType(
  REFGUID rguidType,
  BOOL *pfSupported
);

Parameters

rguidType
[in] TBD
pfSupported
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


ITfMenu

TBD

Methods in Vtable Order

ITfMenu methods | Description
AddMenuItem | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfMenu::AddMenuItem

TBD

HRESULT AddMenuItem(
  UINT uId,
  DWORD dwFlags,
  HBITMAP hbmp,
  HBITMAP hbmpMask,
  const WCHAR* pch,
  ULONG cch,
  ITfMenu** ppMenu
);

Parameters

uId
[in] TBD
dwFlags
[in] TBD
hbmp
[in] TBD
hbmpMask
[in] TBD
pch
[in] TBD
cch
[in] TBD
ppMenu
[in,out,unique] TBD

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfMenu


ITfMessagePump

The ITfMessagePump interface dispatches incoming sent messages, checks the thread message queue for a posted message, and retrieves any existing messages. The methods in this interface are wrappers to the GetMessage and PeekMessage functions.

Methods

ITfMessagePump methods | Description
PeekMessageA | TBD
GetMessageA | TBD
PeekMessageW | TBD
GetMessageW | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfMessagePump::GetMessageA

The ITfMessagePump::GetMessageA method retrieves a message from the message queue of the calling thread. This method is a wrapper for the ANSI version of the GetMessage function.

HRESULT GetMessageA(
  LPMSG pMsg,
  HWND hwnd,
  UINT wMsgFilterMin,
  UINT wMsgFilterMax,
  BOOL *pfResult
);

Parameters

pMsg
[out] Pointer to a MSG structure that receives message information.
hwnd
[in] Handle to the window whose messages are to be retrieved. The window must belong to the current thread.
wMsgFilterMin
[in] Specifies the integer value of the lowest message value to be retrieved.
wMsgFilterMax
[in] Specifies the integer value of the highest message value to be retrieved.
pfResult
[out] The actual return values from the GetMessage function.

Return Values

S_OK
The function returns successfully.
E_INVALIDARG
The argument is invalid.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfMessagePump::GetMessageW

The ITfMessagePump::GetMessageW method retrieves a message from the message queue of the calling thread. This method is a wrapper for the Unicode version of the GetMessage function.

HRESULT GetMessageW(
  LPMSG pMsg,
  HWND hwnd,
  UINT wMsgFilterMin,
  UINT wMsgFilterMax,
  BOOL *pfResult
);

Parameters

pMsg
[out] Pointer to a MSG structure that receives message information.
hwnd
[in] Handle to the window whose messages are to be retrieved. The window must belong to the current thread.
wMsgFilterMin
[in] Specifies the integer value of the lowest message value to be retrieved.
wMsgFilterMax
[in] Specifies the integer value of the highest message value to be retrieved.
pfResult
[out] The actual return values from the GetMessage function.

Return Values

S_OK
The function returns successfully.
E_INVALIDARG
The argument is invalid.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfMessagePump::PeekMessageA

The ITfMessagePump::PeekMessageA method dispatches incoming sent messages, checks the thread message queue for a posted message, and retrieves an existing message. This method is a wrapper for the ANSI version of the PeekMessage function.

HRESULT PeekMessageA(
  LPMSG pMsg,
  HWND hwnd,
  UINT wMsgFilterMin,
  UINT wMsgFilterMax,
  UINT wRemoveMsg,
  BOOL *pfResult
);

Parameters

pMsg
[out] Pointer to an MSG structure that receives message information.
hwnd
[in] Handle to the window whose messages are to be retrieved. The window must belong to the current thread.
wMsgFilterMin
[in] Specifies the integer value of the lowest message value to be retrieved.
wMsgFilterMax
[in] Specifies the integer value of the highest message value to be retrieved.
wRemoveMsg
[in] Specifies how messages are handled. See the PeekMessage function for details.
pfResult
[out] The actual return values from the PeekMessageA function.

Return Values

S_OK
The method returned successfully.
E_INVALIDARG
The argument is invalid.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfMessagePump::PeekMessageW

The ITfMessagePump::PeekMessageW method is a wrapper for the PeekMessageW API. (For information on PeekMessage, see the Platform SDK.)

HRESULT PeekMessageW(
  LPMSG pMsg,
  HWND hwnd,
  UINT wMsgFilterMin,
  UINT wMsgFilterMax,
  UINT wRemoveMsg,
  BOOL *pfResult
);

Parameters

pMsg
[out] Pointer to an MSG structure that receives message information.
hwnd
[in] Handle to the window whose messages are to be retrieved. The window must belong to the current thread.
wMsgFilterMin
[in] Specifies the integer value of the lowest message value to be retrieved.
wMsgFilterMax
[in] Specifies the integer value of the highest message value to be retrieved.
wRemoveMsg
[in] Specifies how messages are handled. See the PeekMessage for details.
pfResult
[out] The actual return values from the PeekMessageW function.

Return Values

S_OK
The method returned successfully.
E_INVALIDARG
The argument is invalid.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfMouseSink

The ITfMouseSink interface is implemented by TSF Text Services.

Methods

ITfMouseSink methods | Description
OnMouseEvent | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfMouseSink::OnMouseEvent

TBD

HRESULT OnMouseEvent(
  ULONG uEdge,
  ULONG uQuadrant,
  DWORD dwBtnStatus,
  BOOL *pfEaten
);

Parameters

uEdge
[in] TBD
uQuadrant
[in] TBD
dwBtnStatus
[in] TBD
pfEaten
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfMouseTracker

The ITfMouseTracker interface is implemented by Text Services Framework. A query to ITfContext will get this interface. This interface is used to advise and unadvise a sink for mouse events.

Methods

ITfMouseTracker methods | Description
AdviseMouseSink | Called to find the sink interface on the server.
UnadviseMouseSink | Called by the client to indicate that it no longer requires notifications from the server.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfMouseTracker::AdviseMouseSink

The ITfMouseTracker::AdviseMouseSink method is called to find the sink interface on the server. The sink interface is specified by the pSink parameter. Clients should use ITfMouseTracker::UnadviseSink to disconnect the sink object when notifications are no longer required.

HRESULT AdviseMouseSink(
  ITfRange *range,
  ITfMouseSink *pSink,
  DWORD *pdwCookie
);

Parameters

range
[in] The range in which the mouse event may occur.
pSink
[in] The sink interface on the server.
pdwCookie
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfMouseTracker::UnadviseMouseSink


ITfMouseTracker::UnadviseMouseSink

The ITfMouseTracker::UnadviseMouseSink method is called by the client to indicate that it no longer requires notifications from the server. The Server should release the sink interface, and cease sending notifications on it.

HRESULT UnadviseMouseSink(
  DWORD dwCookie
);

Parameters

dwCookie
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfMouseTracker::AdviseMouseSink


ITfMouseTrackerACP

The ITfMouseTrackerACP interface is implemented by applications. A query to ITextStoreACP will get this interface. This interface is used to advise and unadvise a sink for mouse events in an application character position (ACP) based application.

Methods

ITfMouseTrackerACP methods | Description
AdviseMouseSink | Called to find the sink interface on the server.
UnadviseMouseSink | Called by the client to indicate that it no longer requires notifications from the server.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfMouseTrackerACP::AdviseMouseSink

The ITfMouseTrackerACP::AdviseMouseSink method is called to find the sink interface on the server. The sink interface is specified by the pSink parameter. Clients should use ITfMouseTrackerACP::UnadviseSink to disconnect the sink object when notifications are no longer required.

HRESULT AdviseMouseSink(
  ITfRangeACP *range,
  ITfMouseSink *pSink,
  DWORD *pdwCookie
);

Parameters

range
[in] The range in which the mouse event may occur.
pSink
[in] The sink interface on the server.
pdwCookie
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfMouseTrackerACP::UnadviseMouseSink


ITfMouseTrackerACP::UnadviseMouseSink

The ITfMouseTrackerACP::UnadviseMouseSink method is called by the client to indicate that it no longer requires notifications from the server. The server should release the sink interface, and cease sending notifications on it.

HRESULT UnadviseMouseSink(
  DWORD dwCookie
);

Parameters

dwCookie
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfMouseTrackerACP::AdviseMouseSink


ITfMouseTrackerAnchor

The ITfMouseTrackerAnchor interface is implemented by applications. A query to ITextStoreAnchor will get this interface. This interface is used to advise and unadvise a sink for mouse events in an anchor based application.

Methods

ITfMouseTrackerAnchor methods | Description
AdviseMouseSink | Called to find the sink interface on the server.
UnadviseMouseSink | Called by the client to indicate that it no longer requires notifications from the server.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfMouseTrackerAnchor::AdviseMouseSink

The ITfMouseTrackerAnchor::AdviseMouseSink method is called to find the sink interface on the server. The sink interface is specified by the pSink parameter. Clients should use ITfMouseTrackerAnchor::UnadviseSink to disconnect the sink object when notifications are no longer required.

HRESULT AdviseMouseSink(
  IAnchor *paStart,
  IAnchor *paEnd,
  ITfMouseSink *pSink,
  DWORD *pdwCookie
);

Parameters

paStart
[in] The start of the range in which the mouse event may occur.
paEnd
[in] The end of the range in which the mouse event may occur.
pSink
[in] The sink interface on the server.
pdwCookie
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfMouseTrackerAnchor::UnadviseMouseSink


ITfMouseTrackerAnchor::UnadviseMouseSink

The ITfMouseTrackerAnchor::UnadviseMouseSink method is called by the client to indicate that it no longer requires notifications from the server. The Server should release the sink interface, and cease sending notifications on it.

HRESULT UnadviseMouseSink(
  DWORD dwCookie
);

Parameters

dwCookie
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfMouseTrackerAnchor::AdviseMouseSink


ITfPersistentPropertyLoaderACP

The ITfPersistentPropertyLoaderACP interface is implemented by applications or controls.

Methods

ITfPersistentPropertyLoaderACP methods | Description
LoadProperty | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfPersistentPropertyLoaderACP::LoadProperty

TBD

HRESULT LoadProperty(
  cont TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
  IStream **ppStream
);

Parameters

pHdr
[in] TBD
ppStream
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfPersistentPropertyLoaderAnchor

The ITfPersistentPropertyLoaderAnchor interface is implemented by applications or controls.

Methods

ITfPersistentPropertyLoaderAnchor methods | Description
LoadProperty | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfPersistentPropertyLoaderAnchor::LoadProperty

TBD

HRESULT LoadProperty(
  const TF_PERSISTENT_PROPERTY_HEADER_ANCHOR *pHdr,
  IStream **ppStream
);

Parameters

pHdr
[in] TBD
ppStream
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfPreservedKeyNotifySink

The ITfPreservedKeyNotifySink interface is implemented by applications.

Methods

ITfPreservedKeyNotifySink methods | Description
OnUpdated | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfPreservedKeyNotifySink::OnUpdated

TBD

HRESULT OnUpdated(
  const TF_PRESERVEDKEY *pprekey
);

Parameters

pprekey
[in] TBD

Return Values

TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfProperty

The ITfProperty interface is implemented by Text Services Framework and you access property information with this interface.

TSF Text Services use properties to share public data amongst themselves. Such data include textual strings, display attributes, and language identifiers. Properties are manipulated through the use of this interface.

Applications share property data between themselves and TSF Text Services. Some data are defined as public for any TSF Text Services or applications to inspect or modify. Applications and TSF Text Services can add or refer to this data through property interfaces that are provided by the input context.

Property GUIDs identify the type of the property. There are some predefined property GUIDs. Applications or TSF Text Services can register private properties using a unique GUID.

Methods

ITfProperty methods | Description
FindRange | TBD
SetValueStore | Creates a custom property.
SetValue | Creates a static property.
Clear | Clears the property, ITfProperty.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfProperty::Clear

The ITfProperty::Clear method clears the property, ITfProperty.

HRESULT Clear(
  TfEditCookie ec,
  ITfRange *pRange
);

Parameters

ec
[in] Edit cookie.
pRange
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfProperty::FindRange

TBD

HRESULT FindRange(
  TfEditCookie ec,
  ITfRange *pRange,
  ITfRange **ppRange,
  TfAnchor aPos
);

Parameters

ec
[in] Edit cookie.
pRange
[in] TBD
ppRange
[out] TBD
aPos
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfProperty::SetValue

The ITfProperty::SetValue method creates a static property.

HRESULT SetValue(
  TfEditCookie ec,
  ITfRange *pRange,
  VARIANT *pvarValue
);

Parameters

ec
[in] Edit cookie.
pRange
[in] TBD
pvarValue
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfProperty::SetValueStore


ITfProperty::SetValueStore

The ITfProperty::SetValueStore method creates a custom property.

HRESULT SetValueStore(
  TfEditCookie ec,
  ITfRange *pRange,
  ITfPropertyStore *pPropStore
);

Parameters

ec
[in] Edit cookie.
pRange
[in] TBD
pPropStore
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfProperty::SetValue


ITfPropertyStore

The ITfPropertyStore interface is implemented by TSF Text Services.

Methods

ITfPropertyStore methods | Description
GetType | Returns a GUID that defines a type.
GetDataType | TBD
GetData | TBD
OnTextUpdated | TBD
Shrink | TBD
Divide | TBD
Clone | TBD
GetPropertyRangeCreator | TBD
Serialize | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfPropertyStore::Clone

TBD

HRESULT Clone(
  ITfPropertyStore **pPropStore
);

Parameters

pPropStore
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfPropertyStore::Divide

TBD

HRESULT Divide(
  ITfRange *pRangeThis,
  ITfRange *pRangeNew,
  ITfPropertyStore **ppPropStore
);

Parameters

pRangeThis
[in] TBD
pRangeNew
[in] TBD
ppPropStore
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfPropertyStore::GetData

TBD

HRESULT GetData(
  VARIANT *pvarValue
);

Parameters

pvarValue
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfPropertyStore::GetDataType

TBD

HRESULT GetDataType(
  TfPropertyType *ptype
);

Parameters

ptype
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfPropertyStore::GetPropertyRangeCreator

TBD

HRESULT GetPropertyRangeCreator(
  CLSID *pclsid
);

Parameters

pclsid
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfPropertyStore::GetType

The ITfPropertyStore::GetType method returns a GUID that defines a type.

Property GUIDs identify the type of the property. There are some predefined properties GUIDs. Applications or TSF Text Services can register private properties using a unique GUID.

HRESULT GetType(
  GUID *pguid
);

Parameters

pguid
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfPropertyStore::OnTextUpdated

TBD

HRESULT OnTextUpdated(
  DWORD dwFlags,
  ITfRange *pRangeNew,
  BOOL *pfAccept
);

Parameters

dwFlags
[in] A bit field.
pRangeNew
[in] TBD
pfAccept
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfPropertyStore::Serialize

TBD

HRESULT Serialize(
  IStream *pStream,
  ULONG *pcb
);

Parameters

pStream
[in] TBD
pcb
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfPropertyStore::Shrink

TBD

HRESULT Shrink(
  ITfRange *pRangeNew,
  BOOL *pfFree
);

Parameters

pRangeNew
[in] TBD
pfFree
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfQueryEmbedded

TBD

Methods in Vtable Order

ITfQueryEmbedded Methods | Description
QueryInsertEmbedded | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfQueryEmbedded::QueryInsertEmbedded

TBD

HRESULT QueryInsertEmbedded(
  const GUID* pguidService,
  const FORMATETC* pFormatEtc,
  BOOL* pfInsertable
);

Parameters

pguidService
[in] TBD
pFormatEtc
[in] TBD
pfInsertable
[out] TBD

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfQueryEmbedded


ITfRange

The ITfRange interface is used by clients of the Text Services Framework (TSF) to reference and manipulate text within a given context. The interface ID is IID_ITfRange.

Methods

ITfRange methods | Description
GetText | Reads the text covered by the range.
SetText | Replaces the text covered by the range.
GetFormattedText | Reads the specially formatted content contained within a range.
GetEmbedded | Retrieves content corresponding to an TF_CHAR_EMBEDDED characters in the stream.
InsertEmbedded | Inserts an object at the position occupied by the ranges' start anchor.
ShiftStart | Moves the range's start anchor by a requested number of characters.
ShiftEnd | Moves the range's end anchor by a requested number of characters.
ShiftStartToRange | Moves the range's start anchor to an anchor position of another range.
ShiftEndToRange | Moves the range's end anchor to an anchor position of another range.
ShiftStartRegion | Moves this range's start anchor into a bordering region.
ShiftEndRegion | Moves the end anchor into a bordering region.
IsEmpty | Used to check whether the range is empty or not.
Collapse | Makes the range empty by moving its start and end anchors to the same position.
IsEqualStart | Compares if a specified anchor of a given range matches the start anchor of this range or not.
IsEqualEnd | Compares if a specified anchor of a given range matches the end anchor of this range or not.
CompareStart | Compares the position of the start anchor of this range with that of another anchor.
CompareEnd | Examines the position of the end anchor of this range with that of another.
AdjustForInsert | Adjusts the positions of the anchors for inserting a new composition into the range.
GetGravity | Retrieves the current gravity of the range's two anchors.
SetGravity | Sets the gravity of the range's two anchors.
Clone | Duplicates (deep copy) this range.
GetContext | Retrieves the context to which the range belongs.

Remarks

Text Services Framework implements this this inteface.

Requirements

  Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.

  Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).

  Version: Requires TSF 1.0.

  Header: Declared in Msctf.idl and Msctf.h.


ITfRange::AdjustForInsert

The ITfRange::AdjustForInsert method adjusts the positions of the anchors for inserting a new composition into the range. The adjustment depends on whether the text is inserted preceeding or replacing the selection (insert mode) or the new text is overwritten the underlying text (overtype mode).

HRESULT AdjustForInsert(
  TfEditCookie ec,
  ULONG cch,
  BOOL pfInsertOk
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession, or TFTextStoreImplCookie.
cch
[in] Character count of the text to be inserted.
pfInsertOk
[out] TBD

Return Values

S_OK
The method completed successfully.
TF_E_NOLOCK
The value in the ec parameter is not a valid cookie.

Remarks

When a new composition is inserted into a non-empty range, it can precede the selected text or replace the selection (insert mode). Alternatively, the new text can be overwritten over the selection (overtype mode). Insertion adjustment amounts to possibly collapsing the selection, in the insert mode, or expanding the selection, in the overtype mode, to cover text to be overtyped.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfRange::Clone

The ITfRange::Clone method duplicates (deep copy) this range.

HRESULT Clone(
  ITfRange **ppClone
);

Parameters

ppClone
[out] Receives a pointer to a new range object referencing the same text.

Return Values

S_OK
The method completed successfully.

Remarks

The resulting new range object can be modified without affecting the original one.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfRange::Collapse

The ITfRange::Collapse method makes the range empty by moving its start and end anchors to the same position.

HRESULT Collapse(
  TfEditCookie ec,
  TfAnchor aPos
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession, or TFTextStoreImplCookie.
aPos
[in] Specifies how the range should be collapsed: TF_ANCHOR_END means the start anchor moves to the position of the end anchor and TF_ANCHOR_START means the end anchor moves to the position of the start anchor.

Return Values

S_OK
The method completed successfully.
TF_E_NOLOCK
The cookie in ec is not valid.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfRange::CompareEnd

The ITfRange::CompareEnd method examines the position of the end anchor of this range with that of another anchor.

HRESULT CompareEnd(
  TfEditCookie ec,
  ITfRange *pWith,
  TfAnchor aPos,
  LONG *plResult
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession, or TFTextStoreImplCookie.
pWith
[in] A range of the specified anchor to be compared with the end anchor of this range.
aPos
[in] Specifies which anchor of the pWith range to compare: TF_ANCHOR_START means the start anchor and TF_ANCHOR_END means the end anchor.
plResult
[out] Receives the result of the comparison: -1 means that the end anchor of this range is behind the specified anchor(identified by pWith,aPos); 0 means that the end anchor is at the position of the specified anchor; and 1 means that the end anchor is ahead of the specified anchor.

Return Values

S_OK
The method completed successfully.
TF_E_NOLOCK
The value of the ec parameter is not a valid cookie.

Remarks

This method will never return 0 unless the two anchors are in a single region. Anchor positions include the spaces between regions. If the caller is only interested in determining whether or not the two anchors are positioned at the same location, ITfRange::IsEqualEnd is preferred.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfRange::CompareStart, ITfRange::IsEqualEnd


ITfRange::CompareStart

The ITfRange::CompareStart method compares the position of the start anchor of this range with that of another anchor.

HRESULT CompareStart(
  TfEditCookie ec,
  ITfRange *pWith,
  TfAnchor aPos,
  LONG *plResult
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession, or TFTextStoreImplCookie.
pWith
[in] A range of the specified anchor to be compared with the start anchor of this range.
aPos
[in] Specifies which anchor of the pWith range to compare: TF_ANCHOR_START means the start anchor and TF_ANCHOR_END means the end anchor.
plResult
[out] Receives the result of the comparison: -1 means that the start anchor is behind the specified anchor(identified by pWith,aPos); 0 means that the start anchor is at the position of the specified anchor; and 1 means that the start anchor is ahead of the specified anchor.

Return Values

S_OK
The method completed successfully.
TF_E_NOLOCK
The cookie in ec is not valid.

Remarks

This method will never return 0 unless the two anchors are in a single region. Anchor positions include the spaces between regions. If the caller is only interested in determining whether or not the two anchors are positioned at the same location, ITfRange::IsEqualStart is preferred.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfRange::GetContext

The ITfRange::GetContext method retrieves the context to which the range belongs.

HRESULT GetContext(
  ITfContext **ppContext
);

Parameters

ppContext
[out] Receives a pointer to the context to which the range belongs.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfContext


ITfRange::GetEmbedded

The ITfRange::GetEmbedded method retrieves content corresponding to a TF_CHAR_EMBEDDED character in the stream. The start anchor of the range is positioned just before the character of interest.

HRESULT GetEmbedded(
  TfEditCookie ec,
  REFGUID rguidService,
  REFIID riid,
  IUnknown **ppunk
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession or TFTextStoreImplCookie.
rguidService
[in] Specifies how the embedded content should be retrieve:
GUID_DCSERVICE_DATAOBJECT: Content should be retrieved as a data tranfer object. The value of riid must be IID_IDataObject. The returned object is treated like content from the OLE clipboard. Clients specify this option when they want to a copy of the content.
GUID_DCSERVICE_ACCESSIBLE: The output should be an accessibility object.
GUID_DCSERVICE_ACTIVEX: Caller wants a direct pointer to the object supporting the interface specified by riid.
riid
[in] UUID of the interface on the requested object.
ppunk
[out] The object's interface pointer. It may be safely cast to match riid.

Return Values

This method returns the standard HRESULT value, including:

S_OK
The method completed successfully.
E_NOTIMPL
The implementing application does not expose embedded objects in its stream.
TF_NOOBJECT
The ranges's start anchor is not positioned before a DCCHAR_EMBEDDED character.
TF_NOINTERFACE
The object does support the requested interface.
TF_E_NOSERVICE
The content cannot be returned to match theservice GUID.
TF_E_NOLOCK
The value in the ec paramater is not a valid cookie.

Remarks

There are no guarantees about which interfaces the retrieved object will support, although it is likely that the object will support those interfaces associated with embedded documents or controls such as IOleObject, IDataObject, IViewObject, IPersistStorage, IOleCache, or IDispatch. The caller must be use QueryInterface to probe for any interesting interface. If the method succeeds and the retrieved object is NULL, the application signals the presence of an embedded object but refuses to expose the object itself. Text processors can still benefit from knowing about the potential word break.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfRange::GetFormattedText

The ITfRange::GetFormattedText method reads the specially formatted content contained within a range. The content is packaged in an object supporting the IDataObject interface.

HRESULT GetFormattedText(
  TfEditCookie ec,
  IDataObject **ppDataObject
);

Parameters

ec
[in] Edit cookie.
ppDataObject
[out] Receives an IDataObject object representing the content in the range.

Return Values

This method returns the standard HRESULT value, including:

S_OK
The method completed successfully.
TF_E_NOLOCK
The value of the ec parameter is not a valid cookie.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfRange::GetGravity

The ITfRange::GetGravity method retrieves the current gravity of the range's two anchors.

HRESULT GetGravity(
  TfGravity *pgStart,
  TfGravity *pgEnd
);

Parameters

pgStart
[out] Receives the gravity of the start anchor of the range.
pgEnd
[out] Receives the gravity of the end anchor of the range.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfRange::SetGravity, TF_GRAVITY


ITfRange::GetText

The ITfRange::GetText method reads the text covered by the range.

HRESULT GetText(
  TfEditCookie ec,
  DWORD dwFlags,
  WCHAR *pchText,
  ULONG cchMax,
  ULONG *pcch
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession or TFTextStoreImplCookie.
dwFlags
[in] Bit fields, which can be combined together with the bitwise OR operator, specifying operation behaviors:
TF_TF_MOVESTART: Advance the start anchor past any returned text.
TF_TF_IGNOREEND: Do not stop reading text at the position of the end anchor.
pchText
[out] Pointer to a buffer to receive the text.
cchMax
[in] Maximum size of the text buffer.
pcch
[out] Number of characters written to the text buffer, pchText.

Return Values

This method returns the standard HRESULT value, including:

S_OK
The method completed successfully.
TF_E_NOLOCK
The value of the ec parameter is not a valid cookie.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfRange::InsertEmbedded

The ITfRange::InsertEmbedded method inserts an object at the position occupied by the ranges' start anchor.

HRESULT InsertEmbedded(
  TfEditCookie ec,
  DWORD dwFlags,
  IDataObject *pDataObject
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession or TFTextStoreImplCookie.
dwFlags
[in] Bit fields, specifying the how insertion should occur.
pDataObject
[in] A data transfer object the applicatioin can use to obtain a copy of the content to be inserted.

Return Values

This method returns the standard HRESULT value, including:

S_OK
The method completed successfully.
E_NOTIMPL
The implementing application does not expose embedded objects in its stream
TF_E_NOLOCK
ec is not a valid cookie.

Remarks

You must use this method to insert objects into the text stream, since you may not pass TF_CHAR_EMBEDDED character into ITfRange::SetText. This method is modeled after the OLE clipboard API. Applications will use pDataObject as they would an IDataObject returned from OleGetClipboard.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfRange::IsEmpty

The ITfRange::IsEmpty method is used to check whether the range is empty or not.

HRESULT IsEmpty(
  TfEditCookie ec,
  BOOL *pfEmpty
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession, or TFTextStoreImplCookie.
pfEmpty
[out] A Boolean value indicates the range is empty when it is TRUE, non-empty when it is FALSE.

Return Values

S_OK
The method completed successfully.
TF_E_NOLOCK
The cookie in ec is not valid.

Remarks

A range is empty when its start and end anchors occupy the same position.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfRange::IsEqualEnd

The ITfRange::IsEqualEnd method compares if a specified anchor of a given range matches the end anchor of this range or not.

HRESULT IsEqualEnd(
  TfEditCookie ec,
  ITfRange *pWith,
  TfAnchor aPos,
  BOOL *pfEqual
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession, or TFTextStoreImplCookie.
pWith
[in] A range of the specified anchor to be compared with the end anchor of this range.
aPos
[in] Specifies which anchor of the pWith range to compare: TF_ANCHOR_START means the start anchor and TF_ANCHOR_END means the end anchor.
pfEqual
[out] A Boolean value. Upon return, TRUE means that the specified anchor matches the end anchor of this range. FALSE means otherwise.

Return Values

S_OK
The method completed successfully.
TF_E_NOLOCK
The cookie in ec is not valid.

Remarks

This method behaves identically to ITfRange::IsEqualStart except that the range's end anchor is compared. This method is functionally equivalent with but more efficient than ITfRange::CompareEnd.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfRange::IsEqualStart

The ITfRange::IsEqualStart method compares if a specified anchor of a given range matches the start anchor of this range or not.

HRESULT IsEqualStart(
  TfEditCookie ec,
  ITfRange *pWith,
  TfAnchor aPos,
  BOOL *pfEqual
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession, or TFTextStoreImplCookie.
pWith
[in] A range of the specified anchor to be compared with the start anchor of this range.
aPos
[in] Specifies which anchor of the pWith range to compare: TF_ANCHOR_START means the start anchor and TF_ANCHOR_END means the end anchor.
pfEqual
[out] A Boolean value. Upon return, TRUE means that the specified anchor matches the start anchor of this range. FALSE means otherwise.

Return Values

S_OK
The method completed successfully.
TF_E_NOLOCK
The cookie in ec is not valid.

Remarks

Anchors are always positioned between characters or regions. When two anchors are between the same characters (at the same offset within the text stream) and within the same region, this method return TRUE, otherwise it returns FALSE. This method is functionally equivalent with but more efficient than ITfRange::CompareStart.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfRange::SetGravity

The ITfRange::SetGravity method sets the gravity of the range's two anchors.

HRESULT SetGravity(
  TfEditCookie ec,
  TfGravity gStart,
  TfGravity gEnd
);

Parameters

ec
[in] This parameter needs a description.
gStart
[in] New gravity to be assigned to the start anchor.
gEnd
[in] New gravity to be assigned to the end anchor.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfRange::GetGravity, TF_GRAVITY


ITfRange::SetText

The ITfRange::SetText method replaces the text covered by the range. For an empty range object, the method results in an insertion. If the new text is an empty string or cch is 0, the method deletes the existing text within the range.

HRESULT SetText(
  TfEditCookie ec,
  DWORD dwFlags,
  const WCHAR* pchText,
  LONG cch
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession or TFTextStoreImplCookie.
dwFlags
[in] Bit fields specifying operation behaviors:
TF_ST_CORRECTION: The operation is a correction of the existing content, not a creation of new content.
pchText
[in] Buffer containing the text to replace the content of the range with.
cch
[in] Number of characters in pchText. This value can be -1 if pchText is NULL-terminated.

Return Values

This method returns the standard HRESULT value, including:

S_OK
The method completed successfully.
TF_E_NOLOCK
ec is not a valid cookie.

Remarks

When a range covers multiple regions, ITfRange::SetText should be called on each region separately. Otherwise, the method may not succeed.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfRange::GetText


ITfRange::ShiftEnd

The ITfRange::ShiftEnd method moves the range's end anchor by a requested number of characters.

HRESULT ShiftEnd(
  TfEditCookie ec,
  LONG cchReq,
  LONG *pcch,
  const TF_HALTCOND *pHalt
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession, or TFTextStoreImplCookie.
cchReq
[in] The number of characters the anchor should be shifted. A negative value means a backward move and a positive value means a forward move.
pcch
[out] The number of characters the anchor was actually shifted.
pHalt
[in, unique] This optional TF_HALTCOND structure places conditions on the shift. This parameter may be NULL.

Return Values

S_OK
The method completed successfully.
TF_E_NOLOCK
The cookie in ec is not valid.

Remarks

This method behaves identically to ITfRange::ShiftStart, except that it affects the end anchor.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfRange::ShiftStart


ITfRange::ShiftEndRegion

The ITfRange::ShiftEndRegion method moves the end anchor into a bordering region.

HRESULT ShiftEndRegion(
  TfEditCookie ec,
  TfShiftDir dir,
  BOOL *pfNoRegion
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession, or TFTextStoreImplCookie.
dir
[in] Direction in which the anchor is moved and can be one of the the following options:
TF_SD_BACKWARD: moves to the region immediately preceding the start anchor.
TF_SD_FORWARD: moves to the region immediately following the start anchor.
pfNoRegion
[out] A Boolean value, when TRUE, indicates the start anchor is not positioned adjacent to another region.

Return Values

S_OK
The method completed successfully.
TF_E_NOLOCK
The cookie in ec is not valid.

Remarks

The ITfRange::ShiftEndRegion method behaves identically to ITfRange::ShiftStartRegion, except that the position of the end anchor is adjusted instead.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfRange::ShiftEndToRange

The ITfRange::ShiftEndToRange method moves the range's end anchor to an anchor position of another range.

HRESULT ShiftEndToRange(
  TfEditCookie ec,
  ITfRange *pRange,
  TfAnchor aPos
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession, or TFTextStoreImplCookie.
pRange
[in] Destination range that the anchor of this range will move to.
aPos
[in] Anchor of the destination range, pRange. TF_ANCHOR_START specifies the start anchor of pRange and TF_ANCHOR_END the end anchor.

Return Values

S_OK
The method completed successfully.
TF_E_NOLOCK
The cookie in ec is not valid.

Remarks

This method is more efficient than ITfRange::ShiftEnd and should be used whenever possible.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfRange::ShiftEnd, ITfRange::ShiftStartToRange


ITfRange::ShiftStart

The ITfRange::ShiftStart method moves the range's start anchor by a requested number of characters.

HRESULT ShiftStart(
  TfEditCookie ec,
  LONG cchReq,
  LONG *pcch,
  const TF_HALTCOND *pHalt
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession, or TFTextStoreImplCookie.
cchReq
[in] The number of characters the anchor should be shifted. A negative value means a backward move and a positive value means a forward move.
pcch
[out] The number of characters the anchor was actually shifted.
pHalt
[in, unique] This optional TF_HALTCOND structure places conditions on the shift. This parameter may be NULL.

Return Values

S_OK
The method completed successfully.
TF_E_NOLOCK
The cookie in ec is not valid.

Remarks

The start anchor moves forward if cchReq is positive and backward if the parameter is negative. ITfRange::ShiftStart is blocked by region boundaries. Thus, if the anchor reaches the beginning or ending boundary of the document, the number of characters actually shifted, pcch, will be smaller than that requested, cchReq. In this case, you should perform the operation again using ITfRange::ShiftRegion. ITfRange::ShiftStart is an expensive operation. For better performance try to use ITfRange::ShiftStartToRange, which runs in constant time. If pHalt is non-NULL, it points to a structure that places additional conditions on the shift.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfRange::ShiftEnd


ITfRange::ShiftStartRegion

The ITfRange::ShiftStartRegion moves this range's start anchor into a bordering region.

HRESULT ShiftStartRegion(
  TfEditCookie ec,
  TfShiftDir dir,
  BOOL *pfNoRegion
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession, or TFTextStoreImplCookie.
dir
[in] Direction in which the anchor is moved and can be one of the the following options:
TF_SD_BACKWARD
moves to the region immediately preceding the start anchor.
TF_SD_FORWARD
moves to the region immediately following the the start anchor.
pfNoRegion
[out] A Boolean value, when TRUE, indicates the start anchor is not positioned adjacent to another region.

Return Values

S_OK
The method completed successfully.
TF_E_NOLOCK
The cookie in ec is not valid.

Remarks

The dir parameter specifies whether the shift is towards the beginning of the document (TF_SD_BACKWARD) or towards the end of the document (TF_SD_FORWARD). If the start anchor is not positioned immediately adjacent to a region ahead or behind the anchor (depending on the value of dir), then pfNoRegion will be set to TRUE and the anchor will not be repositioned. Otherwise, the anchor will be repositioned on the opposite side of the region it borders and pfNoRegion will be set to FALSE.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfRange::ShiftStartToRange

The ITfRange::ShiftStartToRange method moves the range's start anchor to an anchor position of another range.

HRESULT ShiftStartToRange(
  TfEditCookie ec,
  ITfRange *pRange,
  TfAnchor aPos
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession, or TFTextStoreImplCookie.
pRange
[in] Another range that the anchor of this range will move to.
aPos
[in] Anchor of the destination range, pRange. TF_ANCHOR_START specifies the start anchor of pRange and TF_ANCHOR_END the end anchor.

Return Values

S_OK
The method completed successfully.
TF_E_NOLOCK
The cookie in ec is not valid.

Remarks

This method is more efficient than ITfRange::ShiftStart and should be used whenever possible.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfRange::ShiftStart, ITfRange::ShiftEndToRange


ITfRangeACP

The ITfRangeACP interface is intended for applications to access and manipulate a range in an ACP-based, or application character position based, text store implementing the ITextStoreACP interface.

Methods

ITfRangeACP methods | Description
GetExtent | Retrieves the range object from an ACP-based text store.
SetExtent | Sets a range on an ACP-based text store.

Remarks

This interface inherits from the ITfRange interface.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfRange, ITextStoreACP


ITfRangeACP::GetExtent

The ITfRangeACP::GetExtent method retrieves the range object from an ACP-based text store.

HRESULT GetExtent(
  LONG *pacpAnchor,
  LONG *pcch
);

Parameters

pacpAnchor
[out] Address of a LONG value to receive the offset of the start anchor of the range.
pcch
[out] Character count of the range.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.
E_FAIL
The text store is not ACP-based.

Remarks

Because a ACP-based text store is for an application and the framework to share data, TSF Text Services should not call this method unless they have their own implementation of the ITfTextStoreACP interface.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfRangeACP::SetExtent


ITfRangeACP::SetExtent

The ITfRangeACP::SetExtent method sets a range on an ACP-based text store.

HRESULT SetExtent(
  LONG acpAnchor,
  LONG cch
);

Parameters

acpAnchor
[in] A LONG value representing the offset of the start anchor of the range.
cch
[in] Character count of the range.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.
E_INVALIDARG
Invalid argument.
E_FAIL
The data stream is not of ACP-based.

Remarks

Because ACP-based text store is for an application and the framework to share data, TSF Text Services should not call this method unless they have their own implementation of the ITfTextStoreACP interface.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfRangeACP::GetExtent


ITfRangeAnchor

The ITfRangeAnchor interface is intended for applications to access and manipulate a range in an anchor-based text store implementing the ITextStoreAnchor interface.

Methods

ITfRangeAnchor methods | Description
GetExtent | Retrieves the range object from an anchor-based text store.
SetExtent | Sets a range on an anchor-based text store.

Remarks

This interface inherits from the ITfRange interface.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfRange, ITextStoreAnchor


ITfRangeAnchor::GetExtent

The ITfRangeAnchor::GetExtent method retrieves the range object from an anchor-based text store.

HRESULT GetExtent(
  IAnchor **ppaStart,
  IAnchor **ppaEnd
);

Parameters

ppaStart
[out] Reference to the start anchor of the range.
ppaEnd
[out] Reference to the end anchor of the range.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.
E_FAIL
The text store is not ACP-based.

Remarks

Because anchor-based text store is for an application and the framework to share data, TSF Text Services should not call this method unless they have their own implementation of the ITfTextStoreAnchor interface.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfRangeAnchor::SetExtent


ITfRangeAnchor::SetExtent

The ITfRangeAnchor::SetExtent method sets a range on an anchor-based text store.

HRESULT SetExtent(
  IAnchor *paStart,
  IAnchor *paEnd
);

Parameters

paStart
[in] Start anchor of the range.
paEnd
[in] End anchor of the range.

Return Values

This method returns the standard HRESULT values, including:

S_OK
The method completed successfully.
E_INVALIDARG
Invalid argument.
E_FAIL
The data stream is not of ACP-based.

Remarks

Because anchor-based text store is for an application and the framework to share data, TSF Text Services should not call this method unless they have their own implementation of the ITfTextStoreAnchor interface

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfRangeAnchor::GetExtent


ITfRangeBackup

The ITfRangeBackup interface is designed for restoring a specified range object from the TSF property store.

Methods

ITfRangeBackup methods | Description
Restore | Restores a specified range object into the TSF context.

Remarks

This interface is implemented by Text Services Framework. TSF Text Services can use the Restore method of this interface to restore the saved property. This is to help a text processor save the whole set of properties for the range on which a correction is being made, so that the text processor can take over any properties, including the text owner, while editing.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfRangeBackup::Restore

The ITfRangeBackup::Restore method restores a specified range object into the TSF context.

HRESULT Restore(
  TfEditCookie ec,
  ITfRange* pRange
);

Parameters

ec
[in] An edit cookie passed to ITfEditSession::DoEditSession.
pRange
[in] The desired range object.

Return Values

This method returns the standard HRESULT values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfReadOnlyProperty

The ITfReadOnlyProperty interface is implemented by Text Services Framework. TBD

Methods

ITfReadOnlyProperty methods | Description
GetType | TBD
EnumRanges | TBD
GetValue | TBD
GetContext | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfReadOnlyProperty::EnumRanges

TBD

HRESULT EnumRanges(
  TfEditCookie ec
  IEnumTfRanges **ppEnum,
  ITfRange *pTargetRange
);

Parameters

ec
[in] TBD
ppEnum
[out] TBD
pTargetRange
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfReadOnlyProperty::GetContext

TBD

HRESULT GetContext(
  ITfContext **ppContext
);

Parameters

ppContext
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfReadOnlyProperty::GetType

TBD

HRESULT GetType(
  GUID *pguid
);

Parameters

pguid
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfReadOnlyProperty::GetValue

TBD

HRESULT GetValue(
  TfEditCookie ec,
  ITfRange *pRange,
  VARIANT *pvarValue
);

Parameters

ec
[in] TBD
pRange
[in] TBD
pvarValue
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfSource

The ITfSource interface is implemented by Text Services Framework (TSF). TBD

Methods

ITfSource methods | Description
AdviseSink | TBD
UnadviseSink | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfSource::AdviseSink

TBD

HRESULT AdviseSink(
  REFIID riid,
  IUnknown *punk,
  DWORD *pdwCookie
);

Parameters

riid
[in] TBD
punk
[in] TBD
pdwCookie
[out] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfSource::UnadviseSink

TBD

HRESULT UnadviseSink(
  DWORD dwCookie
);

Parameters

dwCookie
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfSourceSingle

The ITfSourceSingle interface is implemented by Text Services Framework. TBD

Methods

ITfSourceSingle methods | Description
AdviseSingleSink | TBD
UnadviseSingleSink | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfSourceSingle::AdviseSingleSink

TBD

HRESULT AdviseSingleSink(
  TfClientId tid,
  REFIID riid,
  IUnknown *punk
);

Parameters

tid
[in] TBD
riid
[in] TBD
punk
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfSourceSingle::UnadviseSingleSink

TBD

HRESULT UnadviseSingleSink(
  TfClientId tid,
  REFIID riid
);

Parameters

tid
[in] TBD
riid
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfStatusSink

The ITfStatusSink interface is implemented by TSF Text Services. TBD

Methods

ITfStatusSink methods | Description
OnStatusChange | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfStatusSink::OnStatusChange

TBD

HRESULT OnStatusChange(
  ITfContext *pic,
  DWORD dwFlags
);

Parameters

pic
[in] TBD
dwFlags
[in] TBD

Return Values

This method has no return values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfSystemDeviceTypeLangBarItem

The ITfSystemDeviceTypeLangBarItem interface is implemented by Text Services Framework (TSF).

Methods in Vtable Order

ITfSystemDeviceTypeLangBarItem Methods | Description
SetIconMode | TBD
GetIconMode | TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfSystemDeviceTypeLangBarItem::GetIconMode

TBD

HRESULT GetIconMode(
  DWORD* pdwFlags
);

Parameters

pdwFlags
[out] TBD

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfSystemDeviceTypeLangBarItem


ITfSystemDeviceTypeLangBarItem::SetIconMode

TBD

HRESULT SetIconMode(
  DWORD dwFlags
);

Parameters

dwFlags
[in] TBD

Return Values

S_OK
The method returned successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfSystemDeviceTypeLangBarItem


ITfSystemLangBarItem

The ITfSystemLangBarItem interface is implemented by a system toolbar item that is created by Text Services Framework (TSF). TSF provides certain default system toolbar items, such as buttons and popup menus.

Methods

ITfSystemLangBarItem methods | Description
SetIcon | Puts a new icon on the system toolbar item.
SetTooltipString | Sets a new tooltip string for the system toolbar item.

Remarks

Exposing this interface enables TSF clients, such as text processors, to customize their user-interface while adhering to a common standard and promoting a consistent end-user experiences.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfSystemLangBarItemSink


ITfSystemLangBarItem::SetIcon

The ITfSystemLangBarItem::SetIcon method puts a new icon on the system toolbar item.

HRESULT SetIcon(
  HICON hIcon
);

Parameters

hIcon
[in] Handle to the desired icon.

Return Values

This method returns the standard HRESULT value.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfSystemLangBarItem::SetTooltipString

The ITfSystemLangBarItem::SetTooltipString method sets a new tooltip string for the system toolbar item.

HRESULT SetTooltipString(
  WCHAR *pchToolTip,
  ULONG cch
);

Parameters

pchToolTip
[in] A string to appear as the tooltip.
cch
[in] Size of the string in character.

Return Values

This method returns the standard HRESULT values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfSystemLangBarItemSink

The ITfSystemLangBarItemSink interface is implemented by any Text Services Framework (TSF) object to receive notifications when a system toolbar item is initialized or selected.

Methods

ITfSystemLangBarItemSink methods | Description
InitMenu | Invoked when a system toolbar item is being initialized.
OnMenuSelect | Invoked when a menu item in the toolbar is selected.

Remarks

A system tool bar item is an object implementing the ITfSystemLangBarItem interface. By implementing ITfSystemLangBarItemSink and using ITfSystemLangBarItem, the notification receiver, for example, a text processor, can customize the system toolbar item by changing its icons, tooltips, or menu items.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfSystemLangBarItem, ITfLangBarItem


ITfSystemLangBarItemSink::InitMenu

The ITfSystemLangBarItemSink::InitMenu method is invoked when a system toolbar item is being initialized.

HRESULT InitMenu(
  ITfLangBarItemMenu *pMenu
);

Parameters

pMenu
[in] The menu item on the toolbar to be initialized.

Return Values

This method returns the standard HRESULT values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfSystemLangBarItemSink::OnMenuSelect

The ITfSystemLangBarItemSink::OnMenuSelect method is invoked when a menu item in the toolbar is selected.

HRESULT OnMenuSelect(
  UINT wID
);

Parameters

wID
[in] Index of the menu item selected.

Return Values

This method return standard HRESULT values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


ITfTextEditSink

The ITfTextEditSink interface is implemented by Text Services Framework (TSF) clients, both applications and text processors, to handle text edit events.

Methods

ITfTextEditSink methods | Description
OnEndEdit | Invoked when an edit sessions is about to end to give a TSF client a chance to respond.

Remarks

TSF sends out a notification to all the registered text event sinks before an edit session ends.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfContext::RequestEditSession


ITfTextEditSink::OnEndEdit

The ITfTextEditSink::OnEndEdit method is invoked when an edit session is about to end to give a TSF client a chance to respond.

HRESULT OnEndEdit(
  ITfContext *pic
  TfEditCookie ecReadOnly,
  ITfEditRecord *pEditRecord
);

Parameters

pic
[in] TBD
ecReadOnly
[in] Edit cookie.
pEditRecord
[in] Edit record.

Return Values

This method returns the standard HRESULT values.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfTextInputProcessor

The ITfTextInputProcessor interface is implemented by every text processor. This interface is implemented in order for the text processor to be activated or deactivated properly.

Methods

ITfTextInputProcessor methods | Description
Activate | TBD
Deactivate | Designed for a text processor to properly close itself down before it is released by the framework.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfTextInputProcessor::Activate

The ITfTextInputProcessor::Activate method is designed for a text processor to initiate itself appropriately once . TBD

HRESULT Activate(
  ITfThreadMgr *ptim,
  TfClientId tid
);

Parameters

ptim
[in] The thread manager owning the text processor.
tid
[in] Client identifier identifying the text processor.

Return Values

This method returns the standard HRESULT values.

Remarks

TSF calls this method after instantiating a text processor with CoCreateInstance. All the references to ptim must be released after ITfTextInputProcessor::Deactivate is invoked.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfTextInputProcessor::Deactivate, ITfThreadMgr


ITfTextInputProcessor::Deactivate

The ITfTextInputProcessor::Deactivate method is designed for a text processor to properly close itself down before it is released by the framework.

HRESULT Deactivate(void);

Parameters

This method has no parameters.

Return Values

This method returns the standard HRESULT values.

Remarks

TSF calls ITfTextInputProcessor::Deactivate immediately before releasing its final reference to the text processor. Before this method returns, the text process must release any references to the ptim parameter passed into through ITfTextInputProcessor::Activate.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfTextInputProcessor::Activate, ITfThreadMgr


ITfTextLayoutSink

The ITfTextLayoutSink interface is implemented by TSF Text Services. This interface is implemented to receive notifications of document layout changes from applications.

Methods

ITfTextLayoutSink methods | Description
OnLayoutChange | Invoked when the layout of a document view changes.

Remarks

This interface supports layout changes that occur in either a single view or multiple views.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfContextView, ITfContext


ITfTextLayoutSink::OnLayoutChange

The ITfTextLayoutSink::OnLayoutChange method is invoked when the layout of a document view changes.

HRESULT OnLayoutChange(
  iTFContext *pic,
  TfLayoutCode lcode,
  ITfContextView *pView
);

Parameters

pic
[in] TBD
lcode
[in] Specifies whether a view has just been created (TFL_CREATE), if the geometry of the view has changed (TFL_CHANGE), or whether a view is about to disappear (TFL_DESTROY).
pView
[in] The document view in which the layout change has occurred.

Return Values

This method returns the standard HRESULT values.

Remarks

TFL_CREATE and TFL_DESTROY are only sent for multiple views. Applications with a single view will not generate these codes. Text processors that want to ignore all views but the active view may ignore TFL_CREATE and TFL_DESTROY, but should compare pView with the view returned by ITfContext::GetActiveView before taking any action.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfContextView


ITfThreadFocusSink

The ITfThreadFocusSink interface is implemented by Text Services Framework (TSF) clients to receive notifications and handle events in which the user-interface focus changes. TSF calls the methods of this interface when the appropriate event occurs.

Methods

ITfThreadFocusSink methods | Description
OnSetThreadFocus | Invoked when the UI focus of the thread is set.
OnKillThreadFocus | Called when the UI focus of the thread is unset.

Remarks

TSF invokes methods of this interface when the focus of a user-interface of a thread being set or destroyed.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfThreadMgr


ITfThreadFocusSink::OnKillThreadFocus

The ITfThreadFocusSink::OnKillThreadFocus method is called when the UI focus of the thread is unset.

HRESULT OnKillThreadFocus(void);

Parameters

This method has no parameters.

Return Values

This method returns the standard HRESULT values.

Remarks

TSF clients can implement this method to respond to the event in which the UI focus of the thread is unset.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfThreadMgr, ITfThreadMgr::Deactivate


ITfThreadFocusSink::OnSetThreadFocus

The ITfThreadFocusSink::OnSetThreadFocus method is invoked when the UI focus of the thread is set.

HRESULT OnSetThreadFocus(void);

Parameters

This method has no parameters.

Return Values

This method returns the standard HRESULT values.

Remarks

TSF clients can implement this method to respond to the event in which the UI focus of the thread is set.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfThreadMgr::Activate, ITfThreadMgr::SetFocus


ITfThreadMgr

The ITfThreadMgr interface defines the functionality of a thread manager, the root object, of Text Services Framework (TSF). The responsibility of a thread manager includes activation and deactivation of text processors, creation of document managers, maintainance of document context focuses, and so on.

Methods

ITfThreadMgr methods | Description
Activate | Activates available text processors and initiates the framework-related user interface on the calling thread.
Deactivate | Closes framework-related user interfaces on a calling thread.
CreateDocumentMgr | Creates a new document manager.
EnumDocumentMgrs | Returns an enumerator for all the document managers within the calling thread.
GetFocus | Returns the document manager that currently has the input focus.
SetFocus | Switches the input focus to the specified document manager.
AssociateFocus | Instructs the text framework that a particular document manager should receive the input focus whenever a matching HWND receives the keyboard focus.
IsThreadFocus | Checks if the current thread has the input focus.
GetFunctionProvider | Retrieves a function provider object of a given class identifier.
EnumFunctionProviders | Returns an enumerator for all the function providers within the calling thread.
GetGlobalCompartment | TBD

Remarks

To use the services offered by TSF, applications must first obtain an interface pointer to this interface by calling the CoCreateInstance method. When activated on a thread, a text processor is passed an object supporting ITfThreadMgr.In TSF, the majority of interfaces and objects are accessible through ITfThreadMgr.

Example Code [C/C++]

In the following C/C++ code excerpt, an application initiates the text framework by calling the CoCreateInstance function.

ITfThreadMgr* g_tim;TFCLIENTID g_tid;CoInitialize(NULL);hr = CoCreateInstance(CLSID_TFThreadMgr, NULL, CLSCTX_INPROC_SERVER, IID_ITfThreadMgr, (void**)&g_tim);if (hr != S_OK){    return FALSE;}// ready to start interactingif (g_tim-Activate(&g_tid) != S_OK){    Assert(0); // couldn't activate thread!    return FALSE;}

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfThreadMgr::Activate

The ITfThreadMgr::Activate method activates available text processors and initiates the framework-related user interface on the calling thread.

HRESULT Activate(
  TfClientId *ptid
);

Parameters

ptid
[out] Client identifier to be used by the caller, for example, the application.

Return Values

This method returns the standard HRESULT value, including:

S_OK
The method completed successfully.

Remarks

This method is called by an application. It may be called more than once on a thread, but each call to Activate must be matched with a corresponding call to Deactivate.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfThreadMgr::Deactivate


ITfThreadMgr::AssociateFocus

The ITfThreadMgr::AssociateFocus method instructs the text framework that a particular document manager should receive the input focus whenever a matching HWND receives the keyboard focus.

HRESULT AssociateFocus(
  HWND hwnd,
  ITfDocumentMgr *pdimNew,
  ITfDocumentMgr **ppdimPrev
);

Parameters

hwnd
[in] Window to associate the input focus with.
pdimNew
[in] Document manager associcated with the window.
ppdimPrev
[out] Receives the document manager previously associated with the window.

Return Values

This method returns the standard HRESULT value, including:

S_OK
The method completed successfully.

Remarks

This method cannot deal with windowless controls or multiple document managers living within a single HWND. To handle such situations, clients need to call SetFocus explicitly.The caller should save the ppDmPrev value and use it during cleanup to restore the original association.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfThreadMgr::SetFocus, ITfDocumentMgr


ITfThreadMgr::CreateDocumentMgr

The ITfThreadMgr::CreateDocumentMgr method creates a new document manager.

HRESULT CreateDocumentMgr(
  ITfDocumentMgr **ppdim
);

Parameters

ppdim
[out] Receives the created document manager.

Return Values

This method returns the standard HRESULT value, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfThreadMgr::EnumDocumentMgrs, ITfDocumentMgr


ITfThreadMgr::Deactivate

The ITfThreadMgr::Deactivate method closes framework-related user interfaces on a calling thread.

HRESULT Deactivate(void);

Parameters

This method has no parameters.

Return Values

This method returns the standard HRESULT value, including:

S_OK
The method completed successfully.

Remarks

Each call to this method must be preceded by a call to Activate.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfThreadMgr::Activate


ITfThreadMgr::EnumDocumentMgrs

The ITfThreadMgr::EnumDocumentMgrs method returns an enumerator for all the document managers within the calling thread.

HRESULT EnumDocumentMgrs(
  IEnumTfDocumentMgrs **ppEnum
);

Parameters

ppEnum
[out] Receives a document managers enumerator.

Return Values

This method returns the standard HRESULT value, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

IEnumTfDocumentMgrs


ITfThreadMgr::EnumFunctionProviders

The ITfThreadMgr::EnumFunctionProviders method returns an enumerator for all the function providers within the calling thread.

HRESULT EnumFunctionProviders(
  IEnumTfFunctionProviders **ppEnum
);

Parameters

ppEnum
[out] Receives a function provider enumerator.

Return Values

This method returns the standard HRESULT value, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

IEnumTfFunctionProviders, ITfThreadMgr::GetFunctionProvider


ITfThreadMgr::GetFocus

The ITfThreadMgr::GetFocus method returns the document manager that currently has the input focus.

HRESULT GetFocus(
  ITfDocumentMgr **ppdimFocus
);

Parameters

ppdimFocus
[out] Receives the document manager with the current input focus.

Return Values

This method returns the standard HRESULT value, including:

S_OK
The method completed successfully.
S_FALSE
No document manager has the focus

Remarks

If no document manager currently has the focus, this method will set its ppDimFocus parameter NULL and returns S_FALSE.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfDocumentMgr, ITfThreadMgr::SetFocus, ITfThreadMgr::AssociateFocus


ITfThreadMgr::GetFunctionProvider

The ITfThreadMgr::GetFunctionProvider method retrieves a function provider object of a given class identifier.

HRESULT GetFunctionProvider(
  REFCLSID clsid,
  ITfFunctionProvider **ppFuncProv
);

Parameters

clsid
[in] CLSID of the desired function provider.
ppFuncProv
[out] Receives the function provider.

Return Values

This method returns the standard HRESULT value, including:

S_OK
The method completed successfully.
TF_E_NOPROVIDE
No function provider matching clsid was available.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfFunctionProvider, ITfThreadMgr::EnumFunctionProviders


ITfThreadMgr::GetGlobalCompartment

The ITfThreadMgr::GetGlobalCompartment method. Returns an interface on the system-wide compartment manager. Clients should use the IUnknown::QueryInterface method on the thread manager object to retrieve an interface on the thread compartment manager or on a context object to get a context specific compartment.

HRESULT GetGlobalCompartment(
  ITfCompartmentMgr **ppCompMgr
);

Parameters

ppCompMgr
[out] Receives a pointer to the global compartment manager.

Return Values

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfThreadMgr::IsThreadFocus

The ITfThreadMgr::IsThreadFocus method checks if the current thread has the input focus.

HRESULT IsThreadFocus(
  BOOL *pfThreadFocus
);

Parameters

pfThreadFocus
[out] A Boolean value to receive the confirmation of whether the current thread has the focus (TRUE) or not (FALSE).

Return Values

This method returns the standard HRESULT value, including:

S_OK
The method completed successfully.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


ITfThreadMgr::SetFocus

The ITfThreadMgr::SetFocus method switches the input focus to the specified document manager.

HRESULT SetFocus(
  ITfDocumentMgr *pdimFocus
);

Parameters

pdimFocus
[in] Specifies a document manager to receive input focus.

Return Values

This method returns the standard HRESULT value, including:

S_OK
The method completed successfully.

Remarks

The parameter pdimFocus must not be NULL.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfDocumentMgr, ITfThreadMgr::GetFocus, ITfThreadMgr::AssociateFocus


ITfThreadMgrEventSink

The ITfThreadMgrEventSink interface is implemented by Text Services Framework clients to receive notifications of certain thread manager events.

Methods

ITfThreadMgrEventSink methods | Description
OnInitDocumentMgr | Invoked when a document manager has been activated.
OnUninitDocumentMgr | Invoked when a document manager is deactivated.
OnSetFocus | Invoked when a document view gains the focus.
OnPushContext | Invoked when a context is pushed onto the context stack.
OnPopContext | Invoked when a context is popped out of the context stack.

Remarks

TSF invokes methods of this interface when an appropriate event occurs.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfThreadMgrEventSink

Microsoft Platform SDK, February 2001 Edition.
This content last built on Thursday, February 01, 2001.


ITfThreadMgrEventSink::OnInitDocumentMgr

The ITfThreadMgrEventSink::OnInitDocumentMgr method is invoked when a document manager has been activated.

HRESULT OnInitDocumentMgr(
  ITfDocumentMgr *pdim
);

Parameters

pdim
[in] A document manager object that has been activated.

Return Values

This method returns the standard HRESULT values.

Remarks

TSF clients can implement this method to handle the event of a document manager having been activated.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfThreadMgrEventSink::OnUninitDocumentMgr


ITfThreadMgrEventSink::OnPopContext

The ITfThreadMgrEventSink::OnPopContext method is invoked when a context is popped out of the context stack.

HRESULT OnPopContext(
  ITfContext *pic
);

Parameters

pic
[in] Context that was popped out of the stack.

Return Values

This method returns the standard HREULT value.

Remarks

TSF clients can implement this method to handle the event in which a context is popped out of the stack.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfContext


ITfThreadMgrEventSink::OnPushContext

The ITfThreadMgrEventSink::OnPushContext method is invoked when a context is pushed onto the context stack.

HRESULT OnPushContext(
  ITfContext *pic
);

Parameters

pic
[in] The context that is pushed onto the stack.

Return Values

This methods returns the standard HRESULT values.

Remarks

TSF clients can implement this method to handle the event in which a context is pushed onto the context stack.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfContext


ITfThreadMgrEventSink::OnSetFocus

The ITfThreadMgrEventSink::OnSetFocus method is invoked when a document view gains the focus.

HRESULT OnSetFocus(
  ITfDocumentMgr *pdimFocus,
  ITfDocumentMgr *pdimPrevFocus
);

Parameters

pdimFocus
[in] Document manager having the current input focus.
pdimPrevFocus
[in] Document manager having the previous input focus.

Return Values

This method returns the standard HRESULT values.

Remarks

TSF clients can implement this method to handle the event in which input focuses change.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfThreadMgr::SetFocus


ITfThreadMgrEventSink::OnUninitDocumentMgr

The ITfThreadMgrEventSink::OnUninitDocumentMgr method is invoked when a document manager is deactivated.

HRESULT OnUninitDocumentMgr(
  ITfDocumentMgr *pdim
);

Parameters

pdim
[in] A document manager that has been deactivated.

Return Values

This method resturns the standard HRESULT values.

Remarks

TSF clients can implement this method to handle the event in which a document manager has been deactivated.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfThreadMgrEventSink::OnInitDocumentMgr


Text Services Framework Enumerations

These are the Text Services Framework enumerations.

  • TF_DA_ATTR_INFO
  • TF_DA_COLORTYPE
  • TF_DA_LINESTYLE
  • TfActiveSelEnd
  • TfAnchor
  • TfCandidateResult
  • TfGravity
  • TfLayoutCode
  • TfLBBalloonStyle
  • TfLBIClick
  • TfPropertyType
  • TfSapiObject
  • TfShiftDir
  • TsActiveSelEnd
  • TsGravity
  • TsLayoutCode
  • TsRunType
  • TsShiftDir


TF_DA_ATTR_INFO

Elements of the TF_DA_ATTR_INFO enumerated data structure are used to specify the display attribute information associated with text input.

typedef enum{
  TF_ATTR_INPUT  =  0,
  TF_ATTR_TARGET_CONVERTED  =  1,
  TF_ATTR_CONVERTED  =  2,
  TF_ATTR_TARGET_NOTCONVERTED  =  3,
  TF_ATTR_INPUT_ERROR  =  4,
  TF_ATTR_FIXEDCONVERTED  =  5,
  TF_ATTR_OTHER  =  -1
} TF_DA_ATTR_INFO;

Elements

TF_ATTR_INPUT
Text is being entered by the user and is not yet converted by the text processor.
TF_ATTR_TARGET_CONVERTED
Text has been selected by the user and converted by the text processor.
TF_ATTR_CONVERTED
The text processor has already converted this character.
TF_ATTR_TARGET_NOTCONVERTED
Text is being converted, but has not be converted by the text processor.
TF_ATTR_INPUT_ERROR
Text is the error character and cannot be converted by the text processor.
TF_ATTR_FIXEDCONVERTED
Text will not be converted. The text processor will not convert these characters anymore.
TF_ATTR_OTHER
Reserved for the system.

Remarks

A text processor, especially a keyboard text processor, uses the display attribute information as defined here to provide hint to an application as to what type of text input is being processed. The element is passed around in the bAttr member of the TF_DISPLAYATTRIBUTE structure. The display attribute information defined previously is consistent with the attribute information as discussed in the Composition String section of the Input Method Editor topic. For more information, see Base Services in the Windows SDK Documentation.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

TF_DISPLAYATTRIBUTE, ITfDisplayAttributeInfo, ITfDisplayAttributeMgr, ITfDisplayAttributeNotifySink, ITfDisplayAttributeProvider


TF_DA_COLORTYPE

Elements of the TF_DA_COLORTYPE enumerated data structure are used to specify color types for display attributes.

typedef enum{
  TF_CT_NONE  =  0,
  TF_CT_SYSCOLOR  =  1,
  TF_CT_COLORREF  =  2
} TF_DA_COLORTYPE;

Elements

TF_CT_NONE
Undefined color type.
TF_CT_SYSCOLOR
System color type.
TF_CT_COLORREF
RGB color type, of the 0x00rrggbb hexadecimal format.

Remarks

Application and text processors use elements of this data structure to determine or select color types for display attributes.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

TF_DA_LINESTYLE, TF_DA_ATTR_INFO


TF_DA_LINESTYLE

Elements of the TF_DA_LINESTYLE enumerated data structure are used to specify line styles of display attributes.

typedef enum{
  TF_LS_NONE  =  0,
  TF_LS_SOLID  =  1,
  TF_LS_DOT  =  2,
  TF_LS_DASH  =  3,
  TF_LS_SQUIGGLE  =  4
} TF_DA_LINESTYLE;

Elements

TF_LS_NONE
Undefined line style.
TF_LS_SOLID
Solid line.
TF_LS_DOT
Dotted line.
TF_LS_DASH
Dashed line.
TF_LS_SQUIGGLE
Squiggled line.

Remarks

Applications and text processors use elements of this data structure to specify the line styles of a display attribute.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

TF_DA_ATTR_INFO


TfActiveSelEnd

Elements of the TfActiveSelEnd enumerated data structure specify which end of the selection (for example, a range) is likely to respond to user actions. For example, in many applications holding the shift key down while using the arrow keys will move the active selection end left or right.

typedef enum{
  TF_AE_NONE  =  0,
  TF_AE_START  =  1,
  TF_AE_END  =  2
} TfActiveSelEnd;

Elements

TF_AE_NONE
There is no active end – typical for all selections other than the default selection
TF_AE_START
The selected range's start anchor is the active end and will respond to user action.
TF_AE_END
The selected range's end anchor is the active end and will respond to user action.

Remarks

These constants are assigned to parameters of methods of the ITf* interfaces, but not those of the IText* interfaces.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfRange


TfAnchor

Elements of the TfAnchor enumerated data structure are used to specify the start and end anchors of a Range object.

typedef enum{
  TF_ANCHOR_START  =  0,
  TF_ANCHOR_END  =  1
} TfAnchor;

Elements

TF_ANCHOR_START
The start anchor of a Range object.
TF_ANCHOR_END
The end anchor of the Range object.

Remarks

A range refers to a span of text within a document. Each range is delimited by a start anchor and an end anchor.

Example Code [C/C++]

The following C/C++ code excerpt...TBD

hr = pProp-FindRange(pRange, &pPropRange, TF_ANCHOR_START);

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfRange, TfGravity


TfCandidateResult

Elements of the TfCandidateResult enumerated data structure are used to specify type of operations performed against a given candidate string.

typedef enum{
  CAND_FINALIZED  =  0x0,
  CAND_SELECTED  =  0x1,
  CAND_CANCELED  =  0x2
} TfCandidateResult;

Elements

CAND_FINALIZED
The candidate string has been finalized.
CAND_SELECTED
The candidate string has been selected.
CAND_CANCELED
The candidate string has been canceled.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfCandidateList::SetResult


TfGravity

The TfGravity enumerated data structure specifies the possible values of the gravity property of an anchor. Gravity specifies the directions the anchor should fall and thus determines how text should be inserted into or deleted from a Range object with respect to the anchor.

typedef enum{
  TF_GRAVITY_BACKWARD  =  0,
  TF_GRAVITY_FORWARD  =  1
} TfGravity;

Elements

TF_GRAVITY_BACKWARD
The anchor falls backward, so that the insertion or deletion occurs to the right of the anchor. For example, if you insert the word "very" into the "It is cold today" text with TF_GRAVITY_BACKWARD, you will get "It is very cold today".
TF_GRAVITY_FORWARD
The anchor falls forward, so that the insertion or deletion occurs to the left of the anchor. For example, if you insert the word "very" into the "It is cold today" text with TF_GRAVITY_FORWARD, you will get "It is very cold today".

Remarks

The end anchor automatically readjusts itself to follow the start anchor when gravity tries to put the anchors out of order. For example, if it has TFGRAVITY_FORWARD and has TFGRAVITY_BACKWARD and the two anchors are at the same location, as in "It is today", insertion of the word "cold" results in "It is cold today".

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


TfLayoutCode

Elements of the TfLayoutCode enumerated data structure are used to specify the status of a view.

typedef enum{
  TF_LC_CREATE  =  0,
  TF_LC_CHANGE  =  1,
  TF_LC_DESTROY  =  2
} TfLayoutCode;

Elements

TF_LC_CREATE
The view has just been created.
TF_LC_CHANGE
The view has changed.
TF_LC_DESTROY
The view is about to be destroyed.

Remarks

In TSF, a view is on-screen rendering of document content. These constants are assigned to parameters of methods of the ITf* interfaces, but not those of the IText* interfaces.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfTextLayoutSink


TfLBBalloonStyle

Elements of the TfLBBalloonStyle enumerated data structure are used to specify the balloon style appearing on the tool bar.

typedef enum{
  TF_LB_BALLOON_RECO  =  0,
  TF_LB_BALLOON_SHOW  =  1,
  TF_LB_BALLOON_MISS  =  2
} TfLBBalloonStyle;

Elements

TF_LB_BALLOON_RECO
Balloon style for feedback associated with a speech recognition instance.
TF_LB_BALLOON_SHOW
A SHOW balloon style.
TF_LB_BALLOON_MISS
An unrecognized balloon style.

Remarks

A balloon is a tool bar item that a text processor can use to show any string to provide enhanced feedback to the end user.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


TfLBIClick

Elements of the TfLBIClick enumerated data structure are used to specify how a tool bar item was clicked.

typedef enum{
  TF_LBI_CLK_NONE  =  0,
  TF_LBI_CLK_RIGHT  =  1,
  TF_LBI_CLK_LEFT  =  2,
  TF_LBI_CLK_RIGHT_DBL  =  3,
  TF_LBI_CLK_LEFT_DBL  =  4
} TfLBIClick;

Elements

TF_LBI_CLK_NONE
The item was not clicked.
TF_LBI_CLK_RIGHT
The item was right-clicked.
TF_LBI_CLK_LEFT
The item was left-clicked.
TF_LBI_CLK_RIGHT_DBL
The item was right-double-clicked.
TF_LBI_CLK_LEFT_DBL
The item was left-double-clicked.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


TfPropertyType

Elements of the TfPropertyType enumerated data structure are used to specify data types associated with a property.

typedef enum{
  TF_PT_NONE  =  0,
  TF_PT_UNKNOWN  =  1,
  TF_PT_DWORD  =  2,
  TF_PT_GUID  =  3
} TfPropertyType;

Elements

TF_PT_NONE
The property is empty.
TF_PT_UNKNOWN
The property is undefined.
TF_PT_DWORD
The property is of the DWORD type.
TF_PT_GUID
The property is of the GUID type.

Remarks

In TSF properties are range- or character-based data that can be shared among applications and text processors through the ITfProperty interface. A property type is identified by the property's GUID, whereas the data type of that property is specified by the elements of this enumeration.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfPropertytore::GetDataType


TfSapiObject

Elements of the TfSapiObject enumerated data structure are used to specify types of SAPI objects.

typedef enum{
  GETIF_RESMGR  =  0x0,
  GETIF_RECOCONTEXT  =  0x1,
  GETIF_RECOINSTANCE  =  0x2,
  GETIF_VOICE  =  0x3,
  GETIF_DICTGRAM  =  0x4
} TfSapiObject;

Elements

GETIF_RESMGR
The object is a SAPI resource manager.
GETIF_RECOCONTEXT
The object is a speech recognition context.
GETIF_RECOINSTANCE
The object is an instance of a speech recognition engine.
GETIF_VOICE
The object represents voice stream.
GETIF_DICTGRAM
The object represents dictation grammar.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


TfShiftDir

Elements of the TfShiftDir enumerated data structure are used to specify the direction in which an anchor of a range is moved into a bordering region.

typedef enum{
  TF_SD_BACKWARD  =  0,
  TF_SD_FORWARD  =  1
} TfShiftDir;

Elements

TF_SD_BACKWARD
Moves to the region immediately preceding the start anchor.
TF_SD_FORWARD
Moves to the region immediately following the start anchor.

Remarks

These constants are assigned to parameters of methods of the ITf* interfaces, but not those of the IText* or IAnchor interfaces.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfRange::ShiftStartRegion, ITfRange::ShiftEndRegion


TsActiveSelEnd

Elements of the TsActiveSelEnd enumerated data structure specify which end of the text selection (associated with TextStore) is likely to respond to user actions. For instance, in many applications holding the shift key down while using the arrow keys will move the active selection end left or right.

typedef enum{
  TS_AE_NONE  =  0,
  TS_AE_START  =  1,
  TS_AE_END  =  2
} TsActiveSelEnd;

Elements

TS_AE_NONE
There is no active end – typical for all selections other than the default selection.
TS_AE_START
The selected range's start anchor is the active end and will respond to user action.
TS_AE_END
The selected range's end anchor is the active end and will respond to user action.

Remarks

These constants are assigned to parameters of methods of the IText* interfaces, but not those of the ITf* interfaces.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


TsGravity

Elements of the TsGravity enumerated data structure specify possible values of the gravity property of an anchor (as referenced to through the IAnchor interface). Gravity specifies the directions the anchor should fall and thus determines how text should be inserted into or deleted from a Range object with respect to the anchor.

typedef enum{
  TS_GR_BACKWARD  =  0,
  TS_GR_FORWARD  =  1
} TsGravity;

Elements

TS_GR_BACKWARD
The anchor falls backward, so that the insertion or deletion occurs to the right of the anchor. For example, if you insert the word "very" into the "It is cold today" text with TS_GR_BACKWARD, you will get "It is very cold today".
TS_GR_FORWARD
The anchor falls forward, so that the insertion or deletion occurs to the left of the anchor. For example, if you insert the word "very" into the "It is cold today" text with TS_GR_FORWARD, you will get "It is very cold today".

Remarks

These constants are assigned to parameters of methods of the IAnchor interface, but not those of the ITf* interfaces.

The end anchor automatically readjusts itself to follow the start anchor when gravity tries to put the anchors out of order. For example, if it has TS_GR_FORWARD and has TS_GR_BACKWARD and the two anchors are at the same location, as in "It is today", insertion of the word "cold" results in "It is cold today".

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


TsLayoutCode

Elements of the TsLayoutCode enumerated data structure are used to specify the status of a view.

typedef enum{
  TS_LC_CREATE  =  0,
  TS_LC_CHANGE  =  1,
  TS_LC_DESTROY  =  2
} TsLayoutCode;

Elements

TS_LC_CREATE
The view has just been created.
TS_LC_CHANGE
The view has changed.
TS_LC_DESTROY
The view is about to be destroyed.

Remarks

These constants are assigned to parameters of methods of the IText* interfaces, but not those of the ITf* interfaces.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


TsRunType

TBD

typedef enum{
  TS_RT_PLAIN,
  TS_RT_HIDDEN,
  TS_RT_OPAQUE
} TsRunType;

Elements

TS_RT_PLAIN
TBD
TS_RT_HIDDEN
TBD
TS_RT_OPAQUE
TBD

Remarks

TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


TsShiftDir

Elements of the TsShiftDir enumerated data structure are used to specify direction in which an anchor (as referred to through the IAnchorinterface) is moved into a bordering region.

typedef enum{
  TS_SD_BACKWARD  =  0,
  TS_SD_FORWARD  =  1
} TsShiftDir;

Elements

TS_SD_BACKWARD
Moves to the region immediately preceding the start anchor.
TS_SD_FORWARD
Moves to the region immediately following the start anchor.

Remarks

These constants are assigned to parameters of methods of the IAnchor interface, but not those of the ITf* interfaces.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


Text Services Framework Structures

These are the Text Services Framework structures.

  • TF_DA_COLOR
  • TF_DISPLAYATTRIBUTE
  • TF_HALTCOND
  • TF_LANGBARITEMINFO
  • TF_LANGUAGEPROFILE
  • TF_LBBALLOONINFO
  • TF_LMLATTELEMENT
  • TF_PERSISTENT_PROPERTY_HEADER_ACP
  • TF_PERSISTENT_PROPERTY_HEADER_ANCHOR
  • TF_PRESERVEDKEY
  • TF_PROPERTYVAL
  • TF_SELECTION
  • TF_SELECTIONSTYLE
  • TS_ATTRVAL
  • TS_RUNINFO
  • TS_SELECTION_ACP
  • TS_SELECTION_ANCHOR
  • TS_SELECTIONSTYLE
  • TS_STATUS
  • TS_TEXTCHANGE


TF_DA_COLOR

The TF_DA_COLOR structure represents a color used in display attributes for specifying the color of texts and background of a window or a control.

typedef struct{
  TF_DA_COLORTYPE  type;
  union {
  int nIndex;
  COLORREF cr;;
  };
} TF_DA_COLOR;

Members

type
Color type as defined in the TF_DA_COLORTYPE enumeration.
nIndex
System color, for example, COLOR_WINDOW for the background of a window.
cr
Color as specified by a RGB value.

Remarks

For more information about system colors, see the GetSysColor function in Windows System Information of the Windows SDK documentation.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


TF_DISPLAYATTRIBUTE

The TF_DISPLAYATTRIBUTE structure holds the data that defines a display attribute for rendering text.

typedef struct{
  TF_DA_COLOR      crText;
  TF_DA_COLOR      crBk;
  TF_DA_LINESTYLE  lsStyle;
  BOOL             fBoldLine;
  TF_DA_COLOR      crLine;
  TF_DA_ATTR_INFO  bAttr;
} TF_DISPLAYATTRIBUTE;

Members

crText
Font color the value of which is defined in TF_DA_COLOR.
crBk
Background color the value of which is defined in TF_DA_COLOR.
lsStyle
Line style the value of which is defined in TF_DA_LINESTYLE.
fBoldLine
A Boolean value, when TRUE, specifies that line be bold.
crLine
Line color the value of which is defined in TF_DA_COLOR.
bAttr
Display attribute information the value of which is defined in TF_DA_ATTR_INFO.

Remarks

Display attribute information, bAttr, is typically used to provide clues as to what the display attribute is for.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


TF_HALTCOND

The TF_HALTCOND structure, when non-NULL, holds additional conditions on a range shift.

typedef struct{
  ITfRange*  pHaltRange;
  TfAnchor   aHaltPos;
  DWORD      dwFlags;
} TF_HALTCOND;

Members

pHaltRange
The range object that disables the anchor shift. May be NULL.
aHaltPos
Anchor position.
dwFlags
Bit flag that can be either TF_HF_OBJECT or 0. When the former value is set, the range shift will stop whenever TF_CHAR_EMBEDDED characters are encountered.

Remarks

The pHaltRange member may be NULL, in which case aHaltPos is also ignored. If pHaltRange is non-NULL, then pHaltRange and aHaltPos together specify an anchor that blocks the shift, as if the anchor position was the end-of-document or a region boundary. If the start range is currently positioned at the same location as the anchor in pHaltRange, then the shift will advance 0 characters. If dwFlags has the TF_HF_OBJECT bit set, then the shift will stop if any TF_CHAR_EMBEDDED characters are encountered. If the start anchor would otherwise move past the end anchor, the end anchor is moved to the same location as the start anchor before returning. In the following example, cch == 10 on exit, unless there are not enough characters left in the document or the current region:

pRange-ShiftStart(ec, +10, &cch, NULL);

In this case, if pHaltRange starts 5 characters to the right of pRange, then on exit cch == 5:

TFHALTCOND hc;

hc.pHaltRange = pHaltRange;
hc.aHaltPos = TFANCHOR_START;
hc.dwFlags = 0;

pRange-ShiftStart(ec, +10, &cch, &hc);

If it is absolutely necessary to secure the distance between two anchors, do the following:

TFHALTCOND hc;

hc.pHaltRange = pRange;
hc.aHaltPos = TF_ANCHOR_END;
hc.dwFlags = 0;

pRange-ShiftStart(ec, LONG_MAX, &cch, &hc);

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


TF_LANGBARITEMINFO

The TF_LANGBARITEMINFO structure holds information about an item on the Text Services Framework tool bar.

typedef struct{
  CLSID  clsidTip;
  GUID   guidItem;
  DWORD  dwStyle;
  ULONG  ulSort;
  WCHAR  szDescription[32];
} TF_LANGBARITEMINFO;

Members

clsidTip
Class ID of the text processor owning the item.
guidItem
GUID that identifies the item on the tool bar.
dwStyle
Item style.
ulSort
Sort order.
szDescription[32]
Description of the item to appear in the tooltip.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.


TF_LANGUAGEPROFILE

The TF_LANGUAGEPROFILE structure represents the language profile supplied by a text processor.

typedef struct{
  CLSID   clsid;
  LANGID  langid;
  GUID    catid;
  BOOL    fActive;
  GUID    guidProfile;
} TF_LANGUAGEPROFILE;

Members

clsid
Class identifier of the text processor supplying the language profile.
langid
Language identifier. For more information, see LANGID.
catid
Identifier of the category to which the text processor belongs.
fActive
A Boolean value, when TRUE, indicates that the language is activated.
guidProfile
Description of the language profile.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


TF_LBBALLOONINFO

The TF_LBBALLOONINFO structure represents a pop-up window as a tool bar item in Text Services Framework.

typedef struct{
  TfLBBalloonStyle  style;
  BSTR              bstrText;
} TF_LBBALLOONINFO;

Members

style
A pop-up window style as defined in TfLBBalloonStyle.
bstrText
Text string as feedback to the end user.

Remarks

Pop-up windows are used to supply a text string to give feedback to the end user.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctfutb.idl and Ctfutb.h.
Library: Included as a resource in Msctf.dll.

See Also

Microsoft Platform SDK, February 2001 Edition.
This content last built on Thursday, February 01, 2001.


TF_LMLATTELEMENT

The TF_LMLATTELEMENT structure represents an element of the lattice data for TSF clients to share a common language model.

typedef struct{
  DWORD  dwFrameStart;
  DWORD  dwFrameLen;
  DWORD  dwFlags;
  union {
  INT iCost;};
  BSTR   bstrText;
} TF_LMLATTELEMENT;

Members

dwFrameStart
Starting frame.
dwFrameLen
Size of the frame.
dwFlags
Flags.
iCost
Cost index.
bstrText
Text stream.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Ctffunc.idl and Ctffunc.h.


TF_PERSISTENT_PROPERTY_HEADER_ACP

The TF_PERSISTENT_PROPERTY_HEADER_ACP structure holds the property header for the application character position (ACP) based text data.

typedef struct{
  GUID            guidType;
  LONG            ichStart;
  LONG            cch;
  ULONG           cb;
  TfPropertyType  ipt;
  CLSID           clsidTIP;
} TF_PERSISTENT_PROPERTY_HEADER_ACP;

Members

guidType
Property type GUID. An example is GUID_PROP_LANGID for the property of the LANGID type.
ichStart
Offset in a text stream, which specifies the beginning position of the text of the property. For example, in the property header for the "barks" word in the "The dog barks.", ichStart=9.
cch
Number of characters of the text of the property. In the previous example, cch=5.
cb
Number of bytes of the property value. For example, if the property value is a 60KB GIF file, cb=60KB.
ipt
An intrinsic property type of Text Services Framework as enumerated in TfPropertyType.
clsidTIP
Text processor that owns the property.

Remarks

The data position of an ACP-based property is located using the offset of the text stream and the character count of the data.

When an application (exposing edit controls) uses the ITextStoreACP interface, it uses this data structure to pass the property header information.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


TF_PERSISTENT_PROPERTY_HEADER_ANCHOR

The TF_PERSISTENT_PROPERTY_HEADER_ANCHOR structure holds the property header for the range (ACP) based text data. Range-based data are manipulated using the ITextStoreAnchor interface.

typedef struct{
  GUID            guidType;
  IAnchor*        paStart;
  IAnchor*        paEnd;
  ULONG           cb;
  TfPropertyType  ipt;
  CLSID           clsidTIP;
} TF_PERSISTENT_PROPERTY_HEADER_ANCHOR;

Members

guidType
Property type GUID. An example is GUID_PROP_LANGID for the property of the LANGID type.
paStart
Start anchor of the data.
paEnd
End anchor of the data.
cb
Number of bytes of the property value. For example, for a 60KB GIF file, cb=60KB.
ipt
An intrinsic property type the values of which are enumerated in TfPropertyType.
clsidTIP
Text processor owning the text data.

Remarks

The data position of an anchor-based property is located using the anchor positions of the range.

When an application (exposing edit controls) uses the ITextStoreAnchor interface, it uses this data structure to pass the property header information.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

TF_PERSISTENT_PROPERTY_HEADER_ACP, IAnchor, TfPropertyType


TF_PRESERVEDKEY

The TF_PRESERVEDKEY structure represents a hot key.

typedef struct{
  UINT  uVKey;
  UINT  uModifiers;
} TF_PRESERVEDKEY;

Members

uVKey
Virtual key mapping of the hot key.
uModifiers
A bit flag that determines which key is used.

Remarks

A hot key is such that, when pressed, activates a certain feature regardless of what else is running at the time.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.


TF_PROPERTYVAL

The TF_PROPERTYVAL structure is used to hold the value of any property in TSF. The property can be system-defined or customer-defined.

typedef struct{
  GUID     guidId;
  VARIANT  varValue;
} TF_PROPERTYVAL;

Members

guidId
GUID identifying the property type. For example, GUID_PROP_TEXTOWNER, GUID_PROP_ATTRIBUTE, GUID_PROP_LANGID
varValue
A variant holding the value of the property of the guidId type.

Remarks

Text processors uses properties to share public data amongst themselves. Such data include textual string, display attributes, and language identifier. Properties are manipulated through the use of the ITfProperty interface.

Applications uses attributes to expose their data to TSF. Thus, in TSF, an attribute is a property exposed by an application. For more information, see TS_ATTRVAL.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

TS_ATTRVAL, ITfProperty


TF_SELECTION

The TF_SELECTION structure represents the selection of a text.

typedef struct{
  ITfRange*          range;
  TF_SELECTIONSTYLE  style;
} TF_SELECTION;

Members

range
The range object specifying the selection.
style
Selection style that specifies which end of the selection is active. For more information, see TF_SELECTIONSTYLE.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

TF_SELECTIONSTYLE


TF_SELECTIONSTYLE

The TF_SELECTIONSTYLE structure represents a selection style that specifies which end of the selection is active.

typedef struct{
  TfActiveSelEnd  ase;
  BOOL            fInterimChar;
} TF_SELECTIONSTYLE;

Members

ase
Active selection end, which moves to expand or shrink the selection. The possible values are defined in TfActiveSelEnd.
fInterimChar
A Boolean value, when TRUE, indicates that the range has a width of one and the caret should be rendered as a flashing box, as seen in the Korean keyboard input method editor. In this case, ase=TF_AE_NONE.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

TfActiveSelEnd, TF_SELECTION


TS_ATTRVAL

The TS_ATTRVAL structure is used to hold the value of any attributes in TSF.

typedef struct{
  TS_ATTRID  idAttr;
  DWORD      dwOverlapId;
  VARIANT    varValue;
} TS_ATTRVAL;

Members

idAttr
GUID for the attribute type.
dwOverlapId
A unique identifier of this attribute when it is overlapped with other attributes. This is mainly a feature in Active Accessibility. In TSF the value of this parameter is always zero (0). Any non-zero value will be ignored.
varValue
Value of the attribute.

Remarks

In Text Services Framework, an application uses attributes to expose its data to the framework, whereas text processors use properties to expose their data to the framework. The TS_ATTRVAL is used in ITextStore* interface family.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.
Library: Included as a resource in Msctf.dll.

See Also

ITextStoreACP, ITextStoreAnchor, TF_PropertyVal


TS_RUNINFO

TBD

typedef struct TS_RUNINFO{
  ULONG      uCount;
  TsRunType  type;
} TS_RUNINFO;

Members

uCount
TBD
type
TBD

Remarks

TBD

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


TS_SELECTION_ACP

The TS_SELECTION_ACP structure represents a ACP-based text selection used by TSF-aware applications.

typedef struct{
  LONG               acpStart;
  LONG               acpEnd;
  TS_SELECTIONSTYLE  style;
} TS_SELECTION_ACP;

Members

acpStart
The starting position of the selection.
acpEnd
The end position of the selection.
style
The selection style specifying which end of the selection is active.

Remarks

This data structure is used with ITextStoreACP interface.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.
Library: Included as a resource in Msctf.dll.

See Also

ITextStoreACP::GetSelection, ITextStoreACP::SetSelection, TS_SELECTIONSTYLE


TS_SELECTION_ANCHOR

The TS_SELECTION_ANCHOR structure represents an anchor-based text selection used in a TSF-aware application.

typedef struct{
  IAnchor*           paStart;
  IAnchor*           paEnd;
  TS_SELECTIONSTYLE  style;
} TS_SELECTION_ANCHOR;

Members

paStart
The starting anchor for the selection.
paEnd
The end anchor for the selection.
style
The selection style specifying which end is active.

Remarks

This data structure is used with the ITextStoreAnchor interface.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.
Library: Included as a resource in Msctf.dll.

See Also

ITextStoreAnchor::GetSelection, ITextStoreAnchor::SetSelection, TS_SELECTIONSTYLE


TS_SELECTIONSTYLE

The TS_SELECTIONSTYLE structure is used to hold a selection style that specifies which end of the selection is active.

typedef struct{
  TsActiveSelEnd  ase;
  BOOL            fInterimChar;
} TS_SELECTIONSTYLE;

Members

ase
Active selection end, which moves to expand or shrink the selection. The possible values are defined in TsActiveSelEnd.
fInterimChar
A Boolean value, when TRUE, indicates that the range has a width of one and the caret should be rendered as a flashing box, as seen in the Korean keyboard input method editor. In this case, ase=TS_AE_NONE.

Remarks

This data structure is identical to TF_SELECTIONSTYLE, but is used with the ITextStore* interface family only.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.
Library: Included as a resource in Msctf.dll.

See Also

TS_SELECTION_ACP, TS_SELECTION_ANCHOR, TF_SELECTIONSTYLE


TS_STATUS

The TS_STATUS structure holds two bit fields that are global flags describing document state such as a read-only document.

typedef struct{
  DWORD  dwDynamicFlags;
  DWORD  dwStaticFlags;
} TS_STATUS;

Members

dwDynamicFlags
Flags that can be changed by an application at run-time. For example, an application can enable a checkbox to allow the user to reset the status of documentation. Possible big flags are TS_SD_LOADING and TS_SD_READONLY. ITextStoreACPSink::OnStatusChange or ITextStoreAnchorSink::OnStatusChange reports these bit fields.
dwStaticFlags
Flags that cannot be changed at run-time. Possible values are TS_SS_DISJOINTSEL, TS_SS_REGIONS, TS_SS_TRANSITORY.

Remarks

This data structure is used by TSF-aware applications, which implement either ITextStoreACPSink or ITextStoreAnchorSink, to specify the document status.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.
Library: Included as a resource in Msctf.dll.

See Also

ITextStoreACPSink::OnStatusChange, ITextStoreAnchorSink::OnStatusChange


TS_TEXTCHANGE

The TS_TEXTCHANGE structure is used to hold text changes in an ACP-based data stream.

typedef struct{
  LONG  acpStart;
  LONG  acpOldEnd;
  LONG  acpNewEnd;
} TS_TEXTCHANGE;

Members

acpStart
The starting position where the change took place.
acpOldEnd
The end position before the change occurred.
acpNewEnd
The end position after the change took place.

Remarks

This data structure is used in ITextStoreACP only.

The possible text changes are insertion, deletion, and replacement of text. For example, if you replace the first "t" of "text" with "T", acpStart=0, acpOldEnd=1, and acpNewEnd=1. If you delete the last "t", acpStart=3, acpOldEnd=1, and acpNewEnd=0. If an "a" is inserted between "e" and "x", acpStart=2, acpOldEnd=0, and acpNewEnd=1.

Requirements

Windows NT/2000 or later: Requires Whistler. Available as a redistributable for Windows NT 4.0 and Windows 2000.
Windows 95/98/Me: Requires Windows 98/Me (with the TSF redistributable).
Version: Requires TSF 1.0.
Header: Declared in Textstor.idl and Textstor.h.


Glossary

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z


A

[TBD]


B

[TBD]


C

candidate window
A drop-down box or window used by an input method to display candidate characters or ideographs for user review. The user typically selects a single choice, or executes a command to view more candidates.

See also, candidates.

candidates
A group of alternate characters or ideographs displayed in a candidate window by an input method. The provided candidates are retrieved from a conversion dictionary and represent a phonetic string previously input by the user.

See also, candidate window, input method.

character
The smallest element contained in a writing system or script.
character encoding scheme
The mapping of a character set into octets, bits, or bytes.
Chinese characters
Named based on their origin, Chinese characters are ideographs assimilated into other East Asian languages. Chinese characters are used in East Asian countries and regions, including Korea, Japan, Hong Kong SAR, Taiwan, Singapore, and Vietnam.
conversion dictionary
A dictionary used by an input method to convert input strings into Chinese characters. For Japanese users of input methods, there are conversion dictionaries to convert both romaji and kana into kanji.

See also, Chinese characters, input method.


D

determined string
A text string converted from a phonetic representation into the destination set of characters or ideographs.
double-byte character set (DBCS)
A character set that describes each character in two bytes. Double-byte character sets typically encode kanji, which are ideograph characters used in Japanese.

See also, kanji.


E

encoding
The strategy used to map numerical codes to printable characters or glyphs.

See also, glyph.


F

front-end processor
See input method editor.


G

glyph
A specific instance of a rendered character. Letter forms change not only from typeface to typeface, but also in relation to the letters around them (for example, ligature, which fuses two letters together). For this reason, a glyph must refer to a specific instance of a character.

See also, character.


H

handwriting recognition
[TBD]
hiragana
A syllabary used in the Japanese written language. The syllables graphically described by hiragana are the same as those described in katakana. Hiragana, however, is differently used. Hiragana is used by children who have not yet learned kanji. Hiragana is also used for particles, prepositions, and verb endings in the Japanese language.

See also, syllabary, katakana.


I

inline conversion
Converting Japanese input at the cursor position (in an application) instead of in a dedicated input method window.

See also, input method.

input method
Any method by which text is input, but not directly typed, into a computer. Input methods are used to input characters not generated by any key on a keyboard. Typically input methods take a phonetic rendering of the desired character or ideograph. The input method then provides a list of "candidates," in a "candidate window." Candidates are alternative characters or ideographs, one of which the user selects. Input methods make it possible to use keyboards with fewer keys to enter text in written languages that have large character sets.

See also, candidates, candidate window.

Input Method Editor (IME)
An application that converts user keystrokes to characters or ideographs in a specified written language. An IME usually performs a conversion using a dictionary lookup service. IMEs exist within Text Services Framework as text services.
Input Method Manager (IMM)
A Windows API that manages the interaction between input method editors (IMEs) and the applications that use them. The IMM API is used in Windows 2000, Windows NT 4.0, and some earlier versions of the operating system. Text Services Framework replaces the IMM API.

See also, Input Method Editor.


J

JIS array, Old-JIS array
The Japanese keyboard array in the widest use today. Referred to as the Old-JIS array because there are now more efficient alternatives. This array represents the JIS C 6226-1978 standard.

See also, JIS, JISC.

JIS
The Japanese Industrial Standard. The standard established by the Japanese Industrial Standards Committee (JISC).

See also, JISC, JIS array.

JISC
The Japanese Industrial Standards Committee. This committee establishes JIS standards.

See also, JIS array, JIS.


K

kana
Refers collectively to the hiragana and katakana character sets used in the Japanese written language. Hiragana and katakana have different usages but both describe the same set of syllables, phonemes, used in the Japanese language.

See also, hiragana, katakana, phoneme.

katakana
A syllabary used in the Japanese written language. The syllables grapically described by katakana are the same as those described in hiragana. Katakana, however, is mainly used to represent foreign words or words borrowed from other languages.

See also, hiragana, syllabary.

kanji
The thousands of idiographic characters, borrowed from Chinese, used in the Japanese written language.

See also, Chinese characters.

keyboard layout
The organization of the keys on a computer keyboard. The keyboard layout defines the character or scan code that each key generates.


L

Latin alphabet
The set of 26 characters, from A through Z, derived from the Roman Empire. With modifications, this character set is used to write languages around the world, including but not limited to Africa, the Americas, parts of Asia, and Europe.


M

multiple-byte character
A character described by more than one byte.

See also, multiple-byte character set, single-byte character set, double-byte character set.

multibyte character set (MBCS)
A character set that describes each character in one or more bytes. Multibyte character sets are flexible and include double-byte characters from East Asian languages, in addition to single-byte Latin characters.

See also, multiple-byte character set.


N

New-JIS
The JIS X 0208-1983 standard for character encoding.

See also, New-JIS array.

New-JIS array
A failed replacement for the JIS-array. New-JIS associated two kana characters with each key.

See also, New-JIS.


O

[TBD]


P

phoneme
A distinct and individual sound used in a language.


Q

[TBD]


R

radical
A grouping of strokes in a Chinese character that constitute a basic unit in and of themselves. Chinese characters can be made up of one or more radical, but in each character there is a single radical that determines how the character is indexed, sorted, or classified. This radical has the most bearing on the meaning of the character; other radicals within the character may influence its pronunciation.

See also, Chinese characters.

romaji
A writing system used to render the Japanese language in Roman or Latin characters. Romaji is a western adaptation of the Japanese writing system. It does not replace the Japanese writing system, which is made up of kanji, hiragana and katakana. In Japanese, Latin characters are typically used for words recently borrowed from western languages.

See also, Latin alphabet, kanji, hiragana, katakana.


S

Shift-JIS
The standard Japanese keyboard for multibyte encoding. This keyboard is called Shift-JIS because the codes that it uses are numerically.shifted from the codes used by the JIS standard X-0208 keyboard.

See also, multibyte character set.

single-byte character set (SBCS)
A character set that describes each character in a single byte. This character set is limited to 256 characters. Single-byte character sets typically describe the Latin alphabet used in many Western languages.

See also, Latin alphabet.

SJIS
An abbreviation for the Shift-JIS encoding method common on Japanese PCs.

See also, Shift-JIS.

speech recognition
[TBD]
syllabary
A writing system whose characters each denote a syllable. Hiragana and katakana are syllabaries.

See also, hiragana, katakana.


T

text processor
[TBD]

See also, text service.

text service
[TBD]

See also, text processor.


U

Unicode
A fixed-length 16-bit character encoding method.


V

voice recognition
[TBD]


W

[TBD]


X

[TBD]


Y

[TBD]


Z

[TBD]


Topic Not Found

No matching topic was found. Some possible reasons and remedies are as follows:

  • The file (.chm) that contains the destination topic is not in the expected location.

    Remedy: Rerun the MSDN Library Setup.

  • The file (.chm) that contains the current topic or destination topic is out-of-date and the link is no longer valid.

    Remedy: Install the latest version of the MSDN Library.

  • The MSDN Library CD is not in the CD-ROM drive.

    Remedy: Insert the MSDN Library CD into the CD-ROM drive.