Optional Methods in Control Interfaces

Implementing an interface doesn't necessarily mean implementing all methods of that interface to do anything more than return E_NOTIMPL or S_OK as appropriate. The following table identifies the methods of the interfaces listed in the What Support for an Interface Means topic that a control may implement in this manner. Any method not listed here must be fully implemented if the interface is supported.

IOleControl Comments
GetControlInfo, OnMnemonic
Mandatory for controls with mnemonics.
IOleControl::OnAmbientPropertyChange
Mandatory for controls that use ambient properties.
IOleControl::FreezeEvents
See Event Freezing
IOleObject
SetMoniker
Mandatory if the control is not marked with OLEMISC_CANTLINKINSIDE
GetMoniker
Mandatory if the control is not marked with OLEMISC_CANTLINKINSIDE
InitFromData
Optional
GetClipboardData
Optional
SetExtent
Mandatory only for DVASPECT_CONTENT
GetExtent
Mandatory only for DVASPECT_CONTENT
SetColorScheme
Optional
DoVerb
See note 1
IOleInPlaceObject
ContextSensitiveHelp
Optional
ReactivateAndUndo
Optional
IOleInPlaceActiveObject
ContextSensitiveHelp
Optional
IViewObject2
Freeze
Optional
Unfreeze
Optional
GetColorSet
Optional
IPersistStream, IPersistStreamInit, IPersistMemory
GetSizeMax
See note 2
  1. A control with property pages must support IOleObject::DoVerb for the OLEIVERB_PROPERTIES and OLEIVERB_PRIMARY verbs. A control that can be active must support DoVerb for the OLEIVERB_INPLACEACTIVATE verb. A control that can be UI active must also support DoVerb for the OLEIVERB_UIACTIVATE verb.
  2. If a control supports IPersistStream or IPersistStreamInit and can return an accurate value, then it should do so.

Controls