Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

Indicates whether the control managed by this control site has gained or lost the focus, according to the fGotFocusparameter. The container uses this information to update the state of Default and Cancel buttons according to how the control with the focus processes Return or Esc keys. A control's behavior regarding the Return and Esc keys is specified in the control's CONTROLINFOstructure. See IOleControl::GetControlInfo.

Syntax

HRESULT OnFocus( 
  BOOL 
fGotFocus  
);

Parameters

fGotFocus

[in] Indicates whether the control gained (TRUE) or lost the focus (FALSE).

Return Value

S_OK is returned in all cases.

Requirements

Header ocidl.h
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

COM Interfaces