Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ITextStoreAnchorSink::OnSelectionChange method

The ITextStoreAnchorSink::OnSelectionChange method is called when the selection within the text stream changes. This method should be called whenever the return value of a potential call to ITextStoreAnchor::GetSelection has changed.

Syntax


HRESULT OnSelectionChange();

Parameters

This method has no parameters.

Return value

This method can return one of these values.

ValueDescription
S_OK

The method was successful.

TS_E_NOLOCK

The manager holds a lock on the document.

 

Remarks

This method only needs to be called when the application modifies the selection itself, not when a client modifies the selection with ITextStoreAnchor::SetSelection, ITextStoreAnchor::InsertTextAtSelection, or other ITextStoreAnchor methods.

When calling this method, the application must be able to grant a document lock.

Applications should expect reentrant client calls to ITextStoreAnchor::RequestLock from within this method. An application can grant the lock request synchronously, or, because several changes have been cached, it can grant the lock asynchronously.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Redistributable

TSF 1.0 on Windows 2000 Professional

Header

Textstor.h

IDL

Textstor.idl

DLL

Msctf.dll

See also

ITextStoreAnchorSink
ITextStoreAnchor::InsertTextAtSelection
ITextStoreAnchor::SetSelection
ITextStoreAnchor
Document Locks

 

 

Community Additions

Show:
© 2014 Microsoft