Indicates whether the control managed by this control site has gained or lost the focus, according to the fGotFocus parameter. 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 CONTROLINFO structure. See IOleControl::GetControlInfo.
HRESULT OnFocus(
BOOL fGotFocus //Indicates whether the control gained focus
);
Windows NT: Use version 4.0 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in ocidl.h.