This topic has not yet been rated - Rate this topic

IOleControlSite::OnFocus method

Applies to: desktop apps only

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

Syntax

HRESULT OnFocus(
  [in]  BOOL fGotFocus
);

Parameters

fGotFocus [in]

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

Minimum supported server

Windows 2000 Server

Header

OCIdl.h

IDL

OCIdl.idl

IID

IID_IOleControlSite is defined as B196B289-BAB4-101A-B69C-00AA00341D07

See also

IOleControl::GetControlInfo
IOleControlSite

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ