Sets the keyboard focus for a UI-active, windowless object.
HRESULT SetFocus(
BOOL fFocus //Set or release the keyboard focus
);
A windowless object calls this method whenever a windowed object would call the Windows API function SetFocus. Through this call, the windowless object obtains the keyboard focus and can respond to window messages. Normally, this call is made during the UI activation process and within the notification methods IOleInPlaceActiveObject::OnDocWindowActivate(TRUE) and IOleInPlaceActiveObject::OnFrameWindowActivate(TRUE).
In response to this call, the container sets the Windows focus to the window being used to get keyboard messages (usually the container window) and redirects any subsequent keyboard messages to the windowless object that requested the focus.
A windowless object also calls the IOleInPlaceSiteWindowless::SetFocus method with the fFocus parameter set to FALSE to release the keyboard focus without assigning it to any other object. In this case, the container must call the Windows API function SetFocus with a NULL parameter so that no window has the focus.
Windows NT: Use version 4.0 or later. New for OC96.
Windows: Use Windows 95 or later. New for OC96.
Windows CE: Unsupported.
Header: Declared in ocidl.h.