IPreviewHandler::SetFocus method (shobjidl_core.h)
Directs the preview handler to set focus to itself.
Syntax
HRESULT SetFocus();
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
This method should query the state of the SHIFT key to decide whether to set focus to its first tab stop or its last tab stop. This is necessary because the IPreviewHandler::SetFocus can only succeed if the focus is being set to a window created by the calling thread.
This is the extent of accelerator keys coming down from the host to the preview handler; no other accelerators are passed down. IPreviewHandler::TranslateAccelerator is only used for messages from the preview handler's message pump up to the IPreviewHandler object.
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 |