ITextHost::TxActivate method (textserv.h)

Notifies the text host that the control is active.

Syntax

HRESULT TxActivate(
  LONG *plOldState
);

Parameters

plOldState

Type: LONG*

The previous activation state.

Return value

Type: HRESULT

Return S_OK if the method succeeds.

Return the following COM error code if the method fails. For more information on COM error codes, see Error Handling in COM.

Return code Description
E_FAIL
Activation is not possible at this time.

Remarks

It is legal for the host to refuse an activation request; for example, the control may be minimized and thus invisible.

The caller should be able to gracefully handle failure to activate.

No matter how many times this method is called, only one ITextHost::TxDeactivate call is necessary to deactivate the control.

This function returns an opaque handle in plOldState. The caller (the text services object) should save this handle and use it in a subsequent call to ITextHost::TxDeactivate.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header textserv.h
DLL Msftedit.dll

See also

Conceptual

ITextHost

Reference

TxDeactivate

Windowless Rich Edit Controls