Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
TSF Reference
TSF Interfaces
ITfKeystrokeMgr
 ITfKeystrokeMgr::PreserveKey Method

  Switch on low bandwidth view
ITfKeystrokeMgr::PreserveKey Method

Syntax

HRESULT PreserveKey(
  [in]  TfClientId tid,
  [in]  REFGUID rguid,
  [in]  const TF_PRESERVEDKEY *prekey,
  [in]  const WCHAR *pchDesc,
  [in]  ULONG cchDesc
);

Parameters

tid [in]

Contains the client identifier of the TSF text service. This value is passed to the TSF text service in its ITfTextInputProcessor::Activate method.

rguid [in]

Contains the command GUID of the preserved key. This value is passed to the TSF text service ITfKeyEventSink::OnPreservedKey method to identify the preserved key when the preserved key is activated.

prekey [in]

Pointer to a TF_PRESERVEDKEY structure that specifies the preserved key. The uVKey member contains the virtual key code and the uModifiers member identifies the modifiers of the preserved key.

pchDesc [in]

Pointer to a Unicode string that contains the description of the preserved key. This cannot be NULL unless cchDesc is zero.

cchDesc [in]

Specifies the number of characters in pchDesc. Pass zero for this parameter if no description is required.

Return Value

The method can return one of the following values.

ValueDescription

S_OK

The method was successful.

TF_E_ALREADY_EXISTS

The preserved key is registered.

E_INVALIDARG

One or more parameters are invalid.

E_OUTOFMEMORY

A memory allocation error occurred.

E_FAIL

An unspecified error occurred.

Remarks

Preserved keys are registered by TSF text services and provide keyboard shortcuts to common commands implemented by the TSF text service.

Requirements

ClientRequires Windows XP, Windows 2000 Professional, or Windows NT Workstation.
RedistributableRequires TSF 1.0 on Windows NT 4.0, Windows 2000 Professional and Windows MeWindows 98.
HeaderDeclared in Msctf.idl and Msctf.h.
DLLRequires Msctf.dll.

See Also

ITfKeystrokeMgr
ITfKeyEventSink::OnPreservedKey
ITfKeystrokeMgr::UnpreserveKey
ITfTextInputProcessor::Activate
TF_PRESERVEDKEY


Send comments about this topic to Microsoft

Build date: 12/17/2008

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker