IOleControlSite::OnFocus

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
);
 

Parameters

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

Return Values

S_OK
Returned in all cases.

QuickInfo

  Windows NT: Use version 4.0 or later.
  Windows: Use Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in ocidl.h.

See Also

IOleControl::GetControlInfo