Share via


COleControlSite Class

Provides support for custom client-side control interfaces.

class COleControlSite : public CCmdTarget

Members

Public Constructors

Name

Description

COleControlSite::COleControlSite

Constructs a COleControlSite object.

Public Methods

Name

Description

COleControlSite::BindDefaultProperty

Binds the default property of the hosted control to a data source.

COleControlSite::BindProperty

Binds a property of the hosted control to a data source.

COleControlSite::CreateControl

Creates a hosted ActiveX control.

COleControlSite::DestroyControl

Destroys the hosted control.

COleControlSite::DoVerb

Executes a specific verb of the hosted control.

COleControlSite::EnableDSC

Enables data sourcing for a control site.

COleControlSite::EnableWindow

Enables the control site.

COleControlSite::FreezeEvents

Specifies if the control site is accepting events.

COleControlSite::GetDefBtnCode

Retrieves the default button code for the hosted control.

COleControlSite::GetDlgCtrlID

Retrieves the identifier of the control.

COleControlSite::GetEventIID

Retrieves the ID of an event interface for a hosted control.

COleControlSite::GetExStyle

Retrieves the extended styles of the control site.

COleControlSite::GetProperty

Retrieves a specific property of the hosted control.

COleControlSite::GetStyle

Retrieves the styles of the control site.

COleControlSite::GetWindowText

Retrieves the text of the hosted control.

COleControlSite::InvokeHelper

Invoke a specific method of the hosted control.

COleControlSite::InvokeHelperV

Invoke a specific method of the hosted control with a variable list of arguments.

COleControlSite::IsDefaultButton

Determines if the control is the default button in the window.

COleControlSite::IsWindowEnabled

Checks the visible state of the control site.

COleControlSite::ModifyStyle

Modifies the current extended styles of the control site.

COleControlSite::ModifyStyleEx

Modifies the current styles of the control site.

COleControlSite::MoveWindow

Changes the position of the control site.

COleControlSite::QuickActivate

Quick activates the hosted control.

COleControlSite::SafeSetProperty

Sets a property or method of the control without chance of throwing an exception.

COleControlSite::SetDefaultButton

Sets the default button in the window.

COleControlSite::SetDlgCtrlID

Retrieves the identifier of the control.

COleControlSite::SetFocus

Sets the focus to the control site.

COleControlSite::SetProperty

Sets a specific property of the hosted control.

COleControlSite::SetPropertyV

Sets a specific property of the hosted control with a variable list of arguments.

COleControlSite::SetWindowPos

Sets the position of the control site.

COleControlSite::SetWindowText

Sets the text of the hosted control.

COleControlSite::ShowWindow

Shows or hides the control site.

Protected Methods

Name

Description

COleControlSite::GetControlInfo

Retrieves keyboard information and mnemonics for the hosted control.

Public Data Members

Name

Description

COleControlSite::m_bIsWindowless

Determines if the hosted control is a windowless control.

COleControlSite::m_ctlInfo

Contains information on keyboard handling for the control.

COleControlSite::m_dwEventSink

The cookie of the control's connection point.

COleControlSite::m_dwMiscStatus

The miscellaneous states for the hosted control.

COleControlSite::m_dwPropNotifySink

The IPropertyNotifySink cookie of the control.

COleControlSite::m_dwStyle

The styles of the hosted control.

COleControlSite::m_hWnd

The handle of the control site.

COleControlSite::m_iidEvents

The ID of the event interface for the hosted control.

COleControlSite::m_nID

The ID of the hosted control.

COleControlSite::m_pActiveObject

A pointer to the IOleInPlaceActiveObject object of the hosted control.

COleControlSite::m_pCtrlCont

The container of the hosted control.

COleControlSite::m_pInPlaceObject

A pointer to the IOleInPlaceObject object of the hosted control.

COleControlSite::m_pObject

A pointer to the IOleObjectInterface interface of the control.

COleControlSite::m_pWindowlessObject

A pointer to the IOleInPlaceObjectWindowless interface of the control.

COleControlSite::m_pWndCtrl

A pointer to the window object for the hosted control.

COleControlSite::m_rect

The dimensions of the control site.

Remarks

This support is the primary means by which an embedded ActiveX control obtains information about the location and extent of its display site, its moniker, its user interface, its ambient properties, and other resources provided by its container. COleControlSite fully implements the IOleControlSite, IOleInPlaceSite, IOleClientSite, IPropertyNotifySink, IBoundObjectSite, INotifyDBEvents, IRowSetNotify interfaces. In addition, the IDispatch interface (providing support for ambient properties and event sinks) is also implemented.

To create an ActiveX control site using COleControlSite, derive a class from COleControlSite. In your CWnd-derived class for the container (for instance, your dialog box) override the CWnd::CreateControlSite function.

Inheritance Hierarchy

CObject

CCmdTarget

COleControlSite

Requirements

Header: afxocc.h

See Also

Reference

CCmdTarget Class

Hierarchy Chart

COleControlContainer Class