次の方法で共有


IOleControlSite::OnFocus (Compact 2013)

3/26/2014

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.

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

See Also

Reference

IOleControlSite
COM Interfaces