ITextHost::TxGetAcceleratorPos method

Requests the special character to use for the underlining accelerator character.

Syntax


HRESULT TxGetAcceleratorPos(
  LONG *pcp
);

Parameters

pcp

Type: LONG*

The character position of the character to underline. This variable is set by the text host. A character position of –1 (that is, negative one) indicates that no character should be underlined.

Return value

Type: HRESULT

The return value is S_OK.

Remarks

Accelerators allow keyboard shortcuts, or accelerator keys, to various UI elements (such as buttons). Typically, the shortcut character is underlined.

This method tells the text services object which character is the accelerator and thus should be underlined. Note that the text services object does not process accelerators; that is the responsibility of the host.

This method is typically only called if the TXTBIT_SHOWACCELERATOR bit is set in the text services object. See OnTxPropertyBitsChange.

Note  Any change to the text in the text services object results in the invalidation of the accelerator underlining. In this case, it is the host's responsibility to recalculate the appropriate character position and inform the text services object that a new accelerator is available.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Textserv.h

DLL

Msftedit.dll

See also

ITextHost
Reference
OnTxPropertyBitsChange
Conceptual
Windowless Rich Edit Controls

 

 

Community Additions

ADD
Show:
© 2014 Microsoft