IOleControl  2CLIYHP

The IOleControl interface provides the features for supporting keyboard mnemonics (GetControlInfo, OnMnemonic), ambient properties (OnAmbientPropertyChange), and events (FreezeEvents) in control objects.

When to Implement

Implement this interface for a control object to communicate with the control s container, for example, when managing keyboard activity or obtaining the container s ambient properties.

When to Use

A control container uses this interface to work with keyboard mnemonics, ambient properties, and events of a contained control object.

Methods in Vtable Order

IUnknown Methods

Description

QueryInterface2Y54585

Returns pointers to supported interfaces.

AddRef1SHW0SS

Increments reference count.

ReleaseDUW01A

Decrements reference count.

 

IOleControl Methods

Description

GetControlInfo55DN_UW

Fills in a CONTROLINFO structure with information about the control s keyboard behavior.

OnMnemonic48Z__L7

Informs the control that the user has pressed a keystroke that the control specified through GetControlInfo. The control takes whatever action is appropriate for the keystroke.

OnAmbientPropertyChangeBHUDN7

Informs an control that one or more of the container s ambient properties has changed.

FreezeEvents18IE1ZD

Indicates whether or not the container ignores or accepts events from the control.

 

See Also

IOleControlSite, ISimpleFrameSite