COleControl Methods

Construction and Destruction Methods

Method Description
COleControl Creates a COleControl object.
RecreateControlWindow Destroys and re-creates the control's window.

Initialization Methods

Method Description
InitializeIIDs Informs the base class of the interface identifiers (IID) the control will use.
ResetStockProps Initializes COleControl stock properties to their default values.
ResetVersion Initializes the version number to a specified value.
SetInitialSize Sets the size of an ActiveX control when first displayed in a container.

Control Modification Methods

Method Description
GetControlFlags Retrieves the control flag settings.
IsModified Determines if the control state has changed.
SetModifiedFlag Changes the modified state of a control.

Persistence Methods

Method Description
ExchangeExtent Serializes the control's width and height.
ExchangeStockProps Serializes the control's stock properties.
ExchangeVersion Serializes the control's version number.
IsConvertingVBX Allows specialized loading of an ActiveX control.
SerializeExtent Serializes or initializes the display space for the control.
SerializeStockProps Serializes or initializes the COleControl stock properties.
SerializeVersion Serializes or initializes the control's version information.
WillAmbientsBeValidDuringLoad Determines whether ambient properties will be available the next time the control is loaded.

Update and Painting Methods

Method Description
DoSuperclassPaint Redraws an ActiveX control that has been subclassed from a Windows CE control.
InvalidateControl Invalidates an area of the displayed control, causing it to be redrawn.
IsOptimizedDraw Indicates whether the container supports optimized drawing for the current drawing operation.
SelectFontObject Selects a custom Font property into a device context.
TranslateColor Converts an OLE_COLOR value to a COLORREF value.

Dispatch Exceptions Methods

Method Description
GetNotSupported Prevents access to a control's property value by the user.
SetNotPermitted Indicates that an edit request has failed.
SetNotSupported Prevents modification to a control's property value by the user.
ThrowError Signals that an error has occurred in an ActiveX control.

Ambient Property Methods

Method Description
AmbientBackColor Returns the value of the ambient BackColor property.
AmbientDisplayName Returns the name of the control as specified by the container.
AmbientFont Returns the value of the ambient Font property.
AmbientForeColor Returns the value of the ambient ForeColor property.
AmbientLocaleID Returns the container’s locale identifier.
AmbientScaleUnits Returns the type of units used by the container.
AmbientShowGrabHandles Determines if grab handles should be displayed.
AmbientShowHatching Determines if hatching should be displayed.
AmbientTextAlign Returns the type of text alignment specified by the container.
AmbientUIDead Determines if the control should respond to user-interface actions.
AmbientUserMode Determines the mode of the container.
GetAmbientProperty Returns the value of the specified ambient property.

Event Firing Methods

Method Description
FireClick Fires the stock Click event.
FireDblClick Fires the stock DblClick event.
FireError Fires the stock Error event.
FireEvent Fires a custom event.
FireKeyDown Fires the stock KeyDown event.
FireKeyPress Fires the stock KeyPress event.
FireKeyUp Fires the stock KeyUp event.
FireMouseDown Fires the stock MouseDown event.
FireMouseMove Fires the stock MouseMove event.
FireMouseUp Fires the stock MouseUp event.
FireReadyStateChange Fires an event when the control's ready state changes.

Stock Methods

Method Description
DoClick Implementation of the stock DoClick method.
Refresh Forces a repaint of a control's appearance.
GetAppearance Returns the value of the stock Appearance property.
SetAppearance Sets the value of the stock Appearance property.
GetBackColor Returns the value of the stock BackColor property.
SetBackColor Sets the value of the stock BackColor property.
GetBorderStyle Returns the value of the stock BorderStyle property.
SetBorderStyle Sets the value of the stock BorderStyle property
GetEnabled Returns the value of the stock Enabled property.
SetEnabled Sets the value of the stock Enabled property.
GetForeColor Returns the value of the stock ForeColor property.
SetForeColor Sets the value of the stock ForeColor property.
GetFont Returns the value of the stock Font property.
GetFontTextMetrics Returns the metrics of a CFontHolder object.
GetStockTextMetrics Returns the metrics of the stock Font property.
InternalGetFont Returns a CFontHolder object for the stock Font property.
SetFont Sets the value of the stock Font property.
SelectStockFont Selects the control's stock Font property into a device context.
GetHwnd Returns the value of the stock hWnd property.
GetText Returns the value of the stock Text or Caption property.
InternalGetText Retrieves the stock Text or Caption property.
SetText Sets the value of the stock Text or Caption property.

OLE Control Sizing Methods

Method Description
GetControlSize Returns the position and size of the ActiveX control.
SetControlSize Sets the position and size of the ActiveX control.
GetRectInContainer Returns the control's rectangle relative to its container.
SetRectInContainer Sets the control's rectangle relative to its container.

OLE Data Binding Methods

Method Description
BoundPropertyChanged Notifies the container that a bound property has been changed.
BoundPropertyRequestEdit Requests permission to edit the property value.

Simple Frame Methods

Method Description
EnableSimpleFrame Enables simple frame support for a control.

OLE Control Site Methods

Method Description
ControlInfoChanged Call this method after the set of mnemonics handled by the control has changed.
GetClientSite Queries an object for the pointer to its current client site within its container.
GetExtendedControl Retrieves a pointer to an extended control object belonging to the container.
LockInPlaceActive Prevents your control from being deactivated by the container.
TransformCoords Transforms coordinate values between a container and the control.

Modal Dialog Methods

Method Description
PreModalDialog Notifies the container that a modal dialog box is about to be displayed.
PostModalDialog Notifies the container that a modal dialog box has been closed.

Windowless Operations Methods

Method Description
ClipCaretRect Adjusts a caret rectangle if it is overlapped by a control.
GetCapture Determines whether a windowless, activated control object has the mouse capture.
GetClientRect Retrieves the size of the control's client area.
GetDC Provides a means for a windowless control to get a device context from its container.
GetFocus Determines whether the control has the focus.
GetWindowlessDropTarget Override to allow a windowless control to be the target of drag and drop operations.
InvalidateRgn Invalidates the container window's client area within the specified region. Can be used to redraw windowless controls in the region.
OnWindowlessMessage Processes window messages (other than mouse and keyboard messages) for windowless controls.
ReleaseCapture Releases mouse capture.
ReleaseDC Releases the display device context of a container of a windowless control.
ScrollWindow Allows a windowless control to scroll an area within its in-place active image on the display.
SetCapture Causes the control's container window to take possession of the mouse capture on the control's behalf.
SetFocus Causes the control's container window to take possession of the input focus on the control's behalf.

Inactive Pointer Handling Methods

Method Description
ClientToParent Translates a point relative to the control's origin to a point relative to its container's origin.
GetActivationPolicy Alters the default activation behavior of a control that supports the IPointerInactive interface.
GetClientOffset Retrieves the difference between the upper-left corner of the control's rectangular area and the upper-left corner of its client area.
OnInactiveMouseMove Override to have the container for the inactive control under the mouse pointer dispatch WM_MOUSEMOVE messages to the control.
OnInactiveSetCursor Override to have the container for the inactive control under the mouse pointer dispatch WM_SETCURSOR messages to the control.
ParentToClient Translates a point relative to the container's origin to a point relative to the control's origin.

Asynchronous Control Methods

Method Description
GetReadyState Returns the control's readiness state.
InternalSetReadyState Sets the control's readiness state and fires the ready-state-change event.

Overridable Methods

Method Description
DisplayError Displays stock Error events to the control's user.
DoPropExchange Serializes the properties of a COleControl object.
GetClassID Retrieves the COM class identifier of the control.
GetMessageString Provides status bar text for a menu item.
IsSubclassedControl Called to determine if the control subclasses a Windows control.
OnClick Called to fire the stock Click event.
OnDoVerb Called after a control verb has been executed.
OnDraw Called when a control is requested to redraw itself.
OnEdit Called by the container to make an OLE control’s user interface visible in a separate window.
OnEnumVerbs Called by the container to enumerate a control's verbs.
OnEventAdvise Called when event handlers are connected or disconnected from a control.
OnKeyDownEvent Called after the stock KeyDown event has been fired.
OnKeyPressEvent Called after the stock KeyPress event has been fired.
OnKeyUpEvent Called after the stock KeyUp event has been fired.
OnProperties Called when the control’s Properties verb has been invoked.
OnResetState Resets a control's properties to the default values.

Change Notification Methods

Method Description
OnAppearanceChanged Called when the stock Appearance property is changed.
OnBackColorChanged Called when the stock BackColor property is changed.
OnBorderStyleChanged Called when the stock BorderStyle property is changed.
OnEnabledChanged Called when the stock Enabled property is changed.
OnFontChanged Called when the stock Font property is changed.
OnForeColorChanged Called when the stock ForeColor property is changed.
OnTextChanged Called when the stock Text or Caption property is changed.

OLE Interface Notification Methods

Method Description
OnAmbientPropertyChange Called when an ambient property is changed.
OnClose Notifies the control that IOleControl::Close has been called.
OnFreezeEvents Called when a control's events are frozen or unfrozen.
OnGetControlInfo Provides mnemonic information to the container.
OnMnemonic Called when a mnemonic key of the control has been pressed.
OnRenderData Called by the framework to retrieve data in the specified format.
OnRenderFileData Called by the framework to retrieve data from a file in the specified format.
OnRenderGlobalData Called by the framework to retrieve data from global memory in the specified format.
OnSetClientSite Notifies the control that IOleControl::SetClientSite has been called.
OnSetData Replaces the control's data with another value.
OnSetExtent Called after the control's extent has changed.
OnSetObjectRects Called after the control's dimensions have been changed.

IViewObject Interface Notification Overridable Methods

Method Description
OnGetColorSet Notifies the control that IOleObject::GetColorSet has been called.
OnGetNaturalExtent Override to retrieve the control's display size closest to the proposed size and extent mode.
OnGetViewExtent Override to retrieve the size of the control's display areas (can be used to enable two-pass drawing).
OnGetViewRect Override to convert control's size into a rectangle starting at a specific position.
OnGetViewStatus Override to retrieve the control's view status.
OnQueryHitPoint Override to query whether a control's display overlaps a specified point.
OnQueryHitRect Override to query whether a control's display overlaps any point in a specified rectangle.

Property Browsing Methods

Method Description
OnGetDisplayString Called to obtain a string to represent a property value.
OnGetPredefinedStrings Returns strings representing possible values for a property.
OnGetPredefinedValue Returns the value that corresonds to a predefined string.
OnMapPropertyToPage Indicates which property page to use for editing a property.

Framework Methods

Method Description
DrawContent When called by the MFC framework, calls the overridable OnDraw method.