IOleControlSite::OnFocus method (ocidl.h)
Indicates whether the control managed by this control site has gained or lost the focus.
Syntax
HRESULT OnFocus(
[in] BOOL fGotFocus
);
Parameters
[in] 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
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | ocidl.h |