ITextServices::OnTxInPlaceActivate method

Notifies the text services object that this control is in-place active.

Syntax


HRESULT OnTxInPlaceActivate(
  [inconst RECT *prcClient
);

Parameters

prcClient [in]

Type: const RECT*

The control's client rectangle.

Return value

Type: HRESULT

If the object is successfully activated, the return value is S_OK.

If the object could not be activated due to error, the return value is E_FAIL. For more information on COM error codes, see Error Handling in COM.

Remarks

In-place active means that an embedded object is running in-place (for example, for regular controls and embeddings, it would have a window to draw in). In contrast, UI active means that an object currently has the editing focus. For example, things like menus and toolbars on the container may also contain elements from the UI-active control/embedding. There is only one UI-active control at any given time, while there can be many in-place active controls.

Note, UI activation is different from getting the focus. To signal the text services object that the control is getting or losing focus, the host sends WM_SETFOCUS and WM_KILLFOCUS messages. Also, note that a windowless host will pass NULL as the wParam (window that lost the focus) for these messages.

When making the transition directly from a nonactive state to the UI-active state, the host should call ITextServices::OnTxInPlaceActivate first and then ITextServices::OnTxUIActivate.

ITextServices::OnTxInPlaceActivate takes as a parameter the client rectangle of the view being activated. This rectangle is given in client coordinates of the containing window. It is the same as would be obtained by calling TxGetClientRect on the host.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Textserv.h

DLL

Msftedit.dll

See also

ITextServices
Reference
TxGetClientRect
OnTxUIActivate
Conceptual
Windowless Rich Edit Controls
Other Resources
RECT
WM_KILLFOCUS
WM_SETFOCUS

 

 

Show: