Export (0) Print
Expand All
Expand Minimize

CComControlBase Class

This class provides methods for creating and managing ATL controls.

Important note Important

This class and its members cannot be used in applications that execute in the Windows Runtime.

class ATL_NO_VTABLE CComControlBase

Name

Description

CComControlBase::AppearanceType

Override if your m_nAppearance stock property isn't of type short.

Name

Description

CComControlBase::ControlQueryInterface

Retrieves a pointer to the requested interface.

CComControlBase::DoesVerbActivate

Checks that the iVerb parameter used by IOleObjectImpl::DoVerb either activates the control's user interface (iVerb equals OLEIVERB_UIACTIVATE), defines the action taken when the user double-clicks the control (iVerb equals OLEIVERB_PRIMARY), displays the control (iVerb equals OLEIVERB_SHOW), or activates the control (iVerb equals OLEIVERB_INPLACEACTIVATE).

CComControlBase::DoesVerbUIActivate

Checks that the iVerb parameter used by IOleObjectImpl::DoVerb causes the control's user interface to activate and returns TRUE.

CComControlBase::DoVerbProperties

Displays the control's property pages.

CComControlBase::FireViewChange

Call this method to tell the container to redraw the control, or notify the registered advise sinks that the control's view has changed.

CComControlBase::GetAmbientAppearance

Retrieves DISPID_AMBIENT_APPEARANCE, the current appearance setting for the control: 0 for flat and 1 for 3D.

CComControlBase::GetAmbientAutoClip

Retrieves DISPID_AMBIENT_AUTOCLIP, a flag indicating whether the container supports automatic clipping of the control display area.

CComControlBase::GetAmbientBackColor

Retrieves DISPID_AMBIENT_BACKCOLOR, the ambient background color for all controls, defined by the container.

CComControlBase::GetAmbientCharSet

Retrieves DISPID_AMBIENT_CHARSET, the ambient character set for all controls, defined by the container.

CComControlBase::GetAmbientCodePage

Retrieves DISPID_AMBIENT_CODEPAGE, the ambient character set for all controls, defined by the container.

CComControlBase::GetAmbientDisplayAsDefault

Retrieves DISPID_AMBIENT_DISPLAYASDEFAULT, a flag that is TRUE if the container has marked the control in this site to be a default button, and therefore a button control should draw itself with a thicker frame.

CComControlBase::GetAmbientDisplayName

Retrieves DISPID_AMBIENT_DISPLAYNAME, the name the container has supplied to the control.

CComControlBase::GetAmbientFont

Retrieves a pointer to the container's ambient IFont interface.

CComControlBase::GetAmbientFontDisp

Retrieves a pointer to the container's ambient IFontDisp dispatch interface.

CComControlBase::GetAmbientForeColor

Retrieves DISPID_AMBIENT_FORECOLOR, the ambient foreground color for all controls, defined by the container.

CComControlBase::GetAmbientLocaleID

Retrieves DISPID_AMBIENT_LOCALEID, the identifier of the language used by the container.

CComControlBase::GetAmbientMessageReflect

Retrieves DISPID_AMBIENT_MESSAGEREFLECT, a flag indicating whether the container wants to receive window messages (such as WM_DRAWITEM) as events.

CComControlBase::GetAmbientPalette

Retrieves DISPID_AMBIENT_PALETTE, used to access the container's HPALETTE.

CComControlBase::GetAmbientProperty

Retrieves the container property specified by id.

CComControlBase::GetAmbientRightToLeft

Retrieves DISPID_AMBIENT_RIGHTTOLEFT, the direction in which content is displayed by the container.

CComControlBase::GetAmbientScaleUnits

Retrieves DISPID_AMBIENT_SCALEUNITS, the container's ambient units (such as inches or centimeters) for labeling displays.

CComControlBase::GetAmbientShowGrabHandles

Retrieves DISPID_AMBIENT_SHOWGRABHANDLES, a flag indicating whether the container allows the control to display grab handles for itself when active.

CComControlBase::GetAmbientShowHatching

Retrieves DISPID_AMBIENT_SHOWHATCHING, a flag indicating whether the container allows the control to display itself with a hatched pattern when the UI is active.

CComControlBase::GetAmbientSupportsMnemonics

Retrieves DISPID_AMBIENT_SUPPORTSMNEMONICS, a flag indicating whether the container supports keyboard mnemonics.

CComControlBase::GetAmbientTextAlign

Retrieves DISPID_AMBIENT_TEXTALIGN, the text alignment preferred by the container: 0 for general alignment (numbers right, text left), 1 for left alignment, 2 for center alignment, and 3 for right alignment.

CComControlBase::GetAmbientTopToBottom

Retrieves DISPID_AMBIENT_TOPTOBOTTOM, the direction in which content is displayed by the container.

CComControlBase::GetAmbientUIDead

Retrieves DISPID_AMBIENT_UIDEAD, a flag indicating whether the container wants the control to respond to user-interface actions.

CComControlBase::GetAmbientUserMode

Retrieves DISPID_AMBIENT_USERMODE, a flag indicating whether the container is in run-mode (TRUE) or design-mode (FALSE).

CComControlBase::GetDirty

Returns the value of data member m_bRequiresSave.

CComControlBase::GetZoomInfo

Retrieves the x and y values of the numerator and denominator of the zoom factor for a control activated for in-place editing.

CComControlBase::InPlaceActivate

Causes the control to transition from the inactive state to whatever state the verb in iVerb indicates.

CComControlBase::InternalGetSite

Call this method to query the control site for a pointer to the identified interface.

CComControlBase::OnDraw

Override this method to draw your control.

CComControlBase::OnDrawAdvanced

The default OnDrawAdvanced prepares a normalized device context for drawing, then calls your control class's OnDraw method.

CComControlBase::OnKillFocus

Checks that the control is in-place active and has a valid control site, then informs the container that the control has lost focus.

CComControlBase::OnMouseActivate

Checks that the UI is in user mode, then activates the control.

CComControlBase::OnPaint

Prepares the container for painting, gets the control's client area, then calls the control class's OnDraw method.

CComControlBase::OnSetFocus

Checks that the control is in-place active and has a valid control site, then informs the container the control has gained focus.

CComControlBase::PreTranslateAccelerator

Override this method to provide your own keyboard accelerator handlers.

CComControlBase::SendOnClose

Notifies all advisory sinks registered with the advise holder that the control has been closed.

CComControlBase::SendOnDataChange

Notifies all advisory sinks registered with the advise holder that the control data has changed.

CComControlBase::SendOnRename

Notifies all advisory sinks registered with the advise holder that the control has a new moniker.

CComControlBase::SendOnSave

Notifies all advisory sinks registered with the advise holder that the control has been saved.

CComControlBase::SendOnViewChange

Notifies all registered advisory sinks that the control's view has changed.

CComControlBase::SetControlFocus

Sets or removes the keyboard focus to or from the control.

CComControlBase::SetDirty

Sets the data member m_bRequiresSave to the value in bDirty.

Name

Description

CComControlBase::m_bAutoSize

Flag indicating the control cannot be any other size.

CComControlBase::m_bDrawFromNatural

Flag indicating that IDataObjectImpl::GetData and CComControlBase::GetZoomInfo should set the control size from m_sizeNatural rather than from m_sizeExtent.

CComControlBase::m_bDrawGetDataInHimetric

Flag indicating that IDataObjectImpl::GetData should use HIMETRIC units and not pixels when drawing.

CComControlBase::m_bInPlaceActive

Flag indicating the control is in-place active.

CComControlBase::m_bInPlaceSiteEx

Flag indicating the container supports the IOleInPlaceSiteEx interface and OCX96 control features, such as windowless and flicker-free controls.

CComControlBase::m_bNegotiatedWnd

Flag indicating whether or not the control has negotiated with the container about support for OCX96 control features (such as flicker-free and windowless controls), and whether the control is windowed or windowless.

CComControlBase::m_bRecomposeOnResize

Flag indicating the control wants to recompose its presentation when the container changes the control's display size.

CComControlBase::m_bRequiresSave

Flag indicating the control has changed since it was last saved.

CComControlBase::m_bResizeNatural

Flag indicating the control wants to resize its natural extent (its unscaled physical size) when the container changes the control's display size.

CComControlBase::m_bUIActive

Flag indicating the control's user interface, such as menus and toolbars, is active.

CComControlBase::m_bUsingWindowRgn

Flag indicating the control is using the container-supplied window region.

CComControlBase::m_bWasOnceWindowless

Flag indicating the control has been windowless, but may or may not be windowless now.

CComControlBase::m_bWindowOnly

Flag indicating the control should be windowed, even if the container supports windowless controls.

CComControlBase::m_bWndLess

Flag indicating the control is windowless.

CComControlBase::m_hWndCD

Contains a reference to the window handle associated with the control.

CComControlBase::m_nFreezeEvents

A count of the number of times the container has frozen events (refused to accept events) without an intervening thaw of events (acceptance of events).

CComControlBase::m_rcPos

The position in pixels of the control, expressed in the coordinates of the container.

CComControlBase::m_sizeExtent

The extent of the control in HIMETRIC units (each unit is 0.01 millimeters) for a particular display.

CComControlBase::m_sizeNatural

The physical size of the control in HIMETRIC units (each unit is 0.01 millimeters).

CComControlBase::m_spAdviseSink

A direct pointer to the advisory connection on the container (the container's IAdviseSink).

CComControlBase::m_spAmbientDispatch

A CComDispatchDriver object that lets you retrieve and set the container's properties through an IDispatch pointer.

CComControlBase::m_spClientSite

A pointer to the control's client site within the container.

CComControlBase::m_spDataAdviseHolder

Provides a standard means to hold advisory connections between data objects and advise sinks.

CComControlBase::m_spInPlaceSite

A pointer to the container's IOleInPlaceSite, IOleInPlaceSiteEx, or IOleInPlaceSiteWindowless interface pointer.

CComControlBase::m_spOleAdviseHolder

Provides a standard implementation of a way to hold advisory connections.

This class provides methods for creating and managing ATL controls. CComControl Class derives from CComControlBase. When you create a Standard Control or DHTML control using the ATL Control Wizard, the wizard will automatically derive your class from CComControlBase.

For more information about creating a control, see the ATL Tutorial. For more information about the ATL Project Wizard, see the article Creating an ATL Project.

Header: atlctl.h

Show:
© 2014 Microsoft