IOleControlSite::OnFocus method

Indicates whether the control managed by this control site has gained or lost the focus.

Syntax

HRESULT OnFocus(
  BOOL fGotFocus
);

Parameters

fGotFocus

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

Return Value

This method returns S_OK in all cases.

Remarks

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 for more information.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header ocidl.h

See Also

IOleControl::GetControlInfo

IOleControlSite