CStockPropImpl Class
This class provides methods for supporting stock property values.
Important
This class and its members cannot be used in applications that execute in the Windows Runtime.
template <
class T,
class InterfaceName,
const IID* piid= &_ATL_IIDOF(InterfaceName),
const GUID* plibid= &CComModule::m_libid,
WORD wMajor= 1,
WORD wMinor= 0,
class tihclass= CcomTypeInfoHolder
>
class ATL_NO_VTABLE CStockPropImpl :
public IDispatchImpl< InterfaceName, piid, plibid, wMajor,
wMinor, tihclass>
Parameters
T
The class implementing the control and deriving from CStockPropImpl.InterfaceName
A dual interface exposing the stock properties.piid
A pointer to the IID of InterfaceName.plibid
A pointer to the LIBID of the type library containing the definition of InterfaceName.wMajor
The major version of the type library. The default value is 1.wMinor
The minor version of the type library. The default value is 0.tihclass
The class used to manage the type information for T. The default value is CComTypeInfoHolder.
Members
Public Methods
Call this method to get the paint style used by the control, for example, flat or 3D. |
|
Call this method to get the status of the flag that indicates if the control cannot be any other size. |
|
Call this method to get the control's background color. |
|
Call this method to get the control's background style, either transparent or opaque. |
|
Call this method to get the control's border color. |
|
Call this method to get the control's border style. |
|
Call this method to get the status of the flag that indicates if the control's border is visible or not. |
|
Call this method to get the width (in pixels) of the control's border. |
|
Call this method to get the text specified in an object's caption. |
|
Call this method to get the control's drawing mode, for example, XOR Pen or Invert Colors. |
|
Call this method to get the control's drawing style, for example, solid, dashed, or dotted. |
|
Call this method to get the drawing width (in pixels) used by the control's drawing methods. |
|
Call this method to get the status of the flag that indicates if the control is enabled. |
|
Call this method to get the control's fill color. |
|
Call this method to get the control's fill style, for example, solid, transparent, or cross-hatched. |
|
Call this method to get a pointer to the control's font properties. |
|
Call this method to get the control's foreground color. |
|
Call this method to get the window handle associated with the control. |
|
Call this method to get the picture properties of the graphic (icon, bitmap, or metafile) to be displayed when the mouse is over the control. |
|
Call this method to get the type of mouse pointer displayed when the mouse is over the control, for example, arrow, cross, or hourglass. |
|
Call this method to get a pointer to the picture properties of a graphic (icon, bitmap, or metafile) to be displayed. |
|
Call this method to get the control's ready state, for example, loading or loaded. |
|
Call this method to get the flag that indicates if the control is a tab stop or not. |
|
Call this method to get the text that is displayed with the control. |
|
Call this method to get the status of the flag that indicates if the control is valid or not. |
|
Call this method to get the window handle associated with the control. Identical to CStockPropImpl::get_HWND. |
|
Call this method to set the paint style used by the control, for example, flat or 3D. |
|
Call this method to set the value of the flag that indicates if the control cannot be any other size. |
|
Call this method to set the control's background color. |
|
Call this method to set the control's background style. |
|
Call this method to set the control's border color. |
|
Call this method to set the control's border style. |
|
Call this method to set the value of the flag that indicates if the control's border is visible or not. |
|
Call this method to set the width of the control's border. |
|
Call this method to set the text to be displayed with the control. |
|
Call this method to set the control's drawing mode, for example, XOR Pen or Invert Colors. |
|
Call this method to set the control's drawing style, for example, solid, dashed, or dotted. |
|
Call this method to set the width (in pixels) used by the control's drawing methods. |
|
Call this method to set the flag that indicates if the control is enabled. |
|
Call this method to set the control's fill color. |
|
Call this method to set the control's fill style, for example, solid, transparent, or cross-hatched. |
|
Call this method to set the control's font properties. |
|
Call this method to set the control's foreground color. |
|
This method returns E_FAIL. |
|
Call this method to set the picture properties of the graphic (icon, bitmap, or metafile) to be displayed when the mouse is over the control. |
|
Call this method to set the type of mouse pointer displayed when the mouse is over the control, for example, arrow, cross, or hourglass. |
|
Call this method to set the picture properties of a graphic (icon, bitmap, or metafile) to be displayed. |
|
Call this method to set the control's ready state, for example, loading or loaded. |
|
Call this method to set the value of the flag that indicates if the control is a tab stop or not. |
|
Call this method to set the text that is displayed with the control. |
|
Call this method to set the flag that indicates if the control is valid or not. |
|
This method calls CStockPropImpl::put_HWND, which returns E_FAIL. |
|
Call this method to set the control's font properties, with a reference count. |
|
Call this method to set the picture properties of the graphic (icon, bitmap, or metafile) to be displayed when the mouse is over the control, with a reference count. |
|
Call this method to set the picture properties of a graphic (icon, bitmap, or metafile) to be displayed, with a reference count. |
Remarks
CStockPropImpl provides put and get methods for each stock property. These methods provide the code necessary to set or get the data member associated with each property and to notify and synchronize with the container when any property changes.
Visual C++ provides support for stock properties through its wizards. For more information about adding stock properties to a control, see the ATL Tutorial.
For backward compatibility, CStockPropImpl also exposes get_Window and put_Window methods that simply call get_HWND and put_HWND, respectively. The default implementation of put_HWND returns E_FAIL since HWND should be a read-only property.
The following properties also have a putref implementation:
Font
MouseIcon
Picture
The same three stock properties require their corresponding data member to be of type CComPtr or some other class that provides correct interface reference counting by means of the assignment operator.
Inheritance Hierarchy
T
CStockPropImpl
Requirements
Header: atlctl.h