IPreviewHandler::QueryFocus method (shobjidl_core.h)

Directs the preview handler to return the HWND from calling the GetFocus Function.

Syntax

HRESULT QueryFocus(
  [out] HWND *phwnd
);

Parameters

[out] phwnd

Type: HWND*

When this method returns, contains a pointer to the HWND returned from calling the GetFocus Function from the preview handler's foreground thread.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This method is necessary because GetFocus Function can only succeed if the focus is on a window created by the calling thread. This method is used by the host to manage the tabbing order and to support tabbing into and out of the preview handler's windows.

Requirements

Requirement Value
Minimum supported client Windows Vista, Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)
Redistributable Windows Search 4 or later