ITfThreadMgr2::SetFocus method (msctf.h)

Sets the input focus to the specified document manager.

Syntax

HRESULT SetFocus(
  [in] ITfDocumentMgr *pdimFocus
);

Parameters

[in] pdimFocus

Pointer to a ITfDocumentMgr interface that receives the input focus. This parameter cannot be NULL.

Return value

This method can return one of these values.

Value Description
S_OK
The method was successful.
E_INVALIDARG
pdimFocus is invalid.

Remarks

The application must call this method when the document window receives the input focus. If the application associates a window with a document manager using ITfThreadMgr::AssociateFocus, the TSF manager calls this method for the application.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header msctf.h

See also

ITfThreadMgr2