CComControlBase Class
This class provides methods for creating and managing ATL controls.
Important
This class and its members cannot be used in applications that execute in the Windows Runtime.
class ATL_NO_VTABLE CComControlBase
Members
Public Typedefs
Name |
Description |
---|---|
Override if your m_nAppearance stock property isn't of type short. |
Public Constructors
Name |
Description |
---|---|
The constructor. |
|
The destructor. |
Public Methods
Name |
Description |
---|---|
Retrieves a pointer to the requested interface. |
|
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). |
|
Checks that the iVerb parameter used by IOleObjectImpl::DoVerb causes the control's user interface to activate and returns TRUE. |
|
Displays the control's property pages. |
|
Call this method to tell the container to redraw the control, or notify the registered advise sinks that the control's view has changed. |
|
Retrieves DISPID_AMBIENT_APPEARANCE, the current appearance setting for the control: 0 for flat and 1 for 3D. |
|
Retrieves DISPID_AMBIENT_AUTOCLIP, a flag indicating whether the container supports automatic clipping of the control display area. |
|
Retrieves DISPID_AMBIENT_BACKCOLOR, the ambient background color for all controls, defined by the container. |
|
Retrieves DISPID_AMBIENT_CHARSET, the ambient character set for all controls, defined by the container. |
|
Retrieves DISPID_AMBIENT_CODEPAGE, the ambient character set for all controls, defined by the container. |
|
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. |
|
Retrieves DISPID_AMBIENT_DISPLAYNAME, the name the container has supplied to the control. |
|
Retrieves a pointer to the container's ambient IFont interface. |
|
Retrieves a pointer to the container's ambient IFontDisp dispatch interface. |
|
Retrieves DISPID_AMBIENT_FORECOLOR, the ambient foreground color for all controls, defined by the container. |
|
Retrieves DISPID_AMBIENT_LOCALEID, the identifier of the language used by the container. |
|
Retrieves DISPID_AMBIENT_MESSAGEREFLECT, a flag indicating whether the container wants to receive window messages (such as WM_DRAWITEM) as events. |
|
Retrieves DISPID_AMBIENT_PALETTE, used to access the container's HPALETTE. |
|
Retrieves the container property specified by id. |
|
Retrieves DISPID_AMBIENT_RIGHTTOLEFT, the direction in which content is displayed by the container. |
|
Retrieves DISPID_AMBIENT_SCALEUNITS, the container's ambient units (such as inches or centimeters) for labeling displays. |
|
Retrieves DISPID_AMBIENT_SHOWGRABHANDLES, a flag indicating whether the container allows the control to display grab handles for itself when active. |
|
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. |
|
Retrieves DISPID_AMBIENT_SUPPORTSMNEMONICS, a flag indicating whether the container supports keyboard mnemonics. |
|
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. |
|
Retrieves DISPID_AMBIENT_TOPTOBOTTOM, the direction in which content is displayed by the container. |
|
Retrieves DISPID_AMBIENT_UIDEAD, a flag indicating whether the container wants the control to respond to user-interface actions. |
|
Retrieves DISPID_AMBIENT_USERMODE, a flag indicating whether the container is in run-mode (TRUE) or design-mode (FALSE). |
|
Returns the value of data member m_bRequiresSave. |
|
Retrieves the x and y values of the numerator and denominator of the zoom factor for a control activated for in-place editing. |
|
Causes the control to transition from the inactive state to whatever state the verb in iVerb indicates. |
|
Call this method to query the control site for a pointer to the identified interface. |
|
Override this method to draw your control. |
|
The default OnDrawAdvanced prepares a normalized device context for drawing, then calls your control class's OnDraw method. |
|
Checks that the control is in-place active and has a valid control site, then informs the container that the control has lost focus. |
|
Checks that the UI is in user mode, then activates the control. |
|
Prepares the container for painting, gets the control's client area, then calls the control class's OnDraw method. |
|
Checks that the control is in-place active and has a valid control site, then informs the container the control has gained focus. |
|
Override this method to provide your own keyboard accelerator handlers. |
|
Notifies all advisory sinks registered with the advise holder that the control has been closed. |
|
Notifies all advisory sinks registered with the advise holder that the control data has changed. |
|
Notifies all advisory sinks registered with the advise holder that the control has a new moniker. |
|
Notifies all advisory sinks registered with the advise holder that the control has been saved. |
|
Notifies all registered advisory sinks that the control's view has changed. |
|
Sets or removes the keyboard focus to or from the control. |
|
Sets the data member m_bRequiresSave to the value in bDirty. |
Public Data Members
Name |
Description |
---|---|
Flag indicating the control cannot be any other size. |
|
Flag indicating that IDataObjectImpl::GetData and CComControlBase::GetZoomInfo should set the control size from m_sizeNatural rather than from m_sizeExtent. |
|
Flag indicating that IDataObjectImpl::GetData should use HIMETRIC units and not pixels when drawing. |
|
Flag indicating the control is in-place active. |
|
Flag indicating the container supports the IOleInPlaceSiteEx interface and OCX96 control features, such as windowless and flicker-free controls. |
|
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. |
|
Flag indicating the control wants to recompose its presentation when the container changes the control's display size. |
|
Flag indicating the control has changed since it was last saved. |
|
Flag indicating the control wants to resize its natural extent (its unscaled physical size) when the container changes the control's display size. |
|
Flag indicating the control's user interface, such as menus and toolbars, is active. |
|
Flag indicating the control is using the container-supplied window region. |
|
Flag indicating the control has been windowless, but may or may not be windowless now. |
|
Flag indicating the control should be windowed, even if the container supports windowless controls. |
|
Flag indicating the control is windowless. |
|
Contains a reference to the window handle associated with the control. |
|
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). |
|
The position in pixels of the control, expressed in the coordinates of the container. |
|
The extent of the control in HIMETRIC units (each unit is 0.01 millimeters) for a particular display. |
|
The physical size of the control in HIMETRIC units (each unit is 0.01 millimeters). |
|
A direct pointer to the advisory connection on the container (the container's IAdviseSink). |
|
A CComDispatchDriver object that lets you retrieve and set the container's properties through an IDispatch pointer. |
|
A pointer to the control's client site within the container. |
|
Provides a standard means to hold advisory connections between data objects and advise sinks. |
|
A pointer to the container's IOleInPlaceSite, IOleInPlaceSiteEx, or IOleInPlaceSiteWindowless interface pointer. |
|
Provides a standard implementation of a way to hold advisory connections. |
Remarks
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.
Requirements
Header: atlctl.h