CMFCControlRendererInfo Class

A helper class for passing parameters to CMFCControlRenderer Class.

class CMFCControlRendererInfo

Members

Public Constructors

Name

Description

CMFCControlRendererInfo::CMFCControlRendererInfo

Constructs a CMFCControlRendererInfo object.

CMFCControlRendererInfo::~CMFCControlRendererInfo

Destructor.

Public Methods

Name

Description

CMFCControlRendererInfo::CommonInit

Initializes public members, setting them to default values.

CMFCControlRendererInfo::GetResourceID

Returns the resource ID of the image that CMFCControlRenderer uses for drawing.

CMFCControlRendererInfo::SetResourceID

Sets the resource ID of the image that CMFCControlRenderer will use.

CMFCControlRendererInfo::operator =

Copy operator. Implements deep copy of class members.

Data Members

Name

Description

CMFCControlRendererInfo::m_bPreMultiplyCheck

Indicates whether a premultiply check of 32-bit images that use the alpha channel is required for correct appearance.

CMFCControlRendererInfo::m_clrTransparent

Transparent color of the image. Those parts of the image that are of this color will be transparent.

CMFCControlRendererInfo::m_rectCorners

Specifies corner sizes.

CMFCControlRendererInfo::m_rectImage

An image rectangle. CMFCControlRenderer operates only on the portion of an image that is identified by this rectangle.

CMFCControlRendererInfo::m_rectInter

Specifies the inner rectangle of the image. Usually it is m_rectImage reduced by m_rectCorner values.

CMFCControlRendererInfo::m_rectSides

Specifies the borders of an image.

CMFCControlRendererInfo::m_strBmpResID

The resource ID string of the image.

CMFCControlRendererInfo::m_uiBmpResID

The resource ID of the image.

Remarks

This class supports the MFC framework infrastructure and is not intended to be used directly from your code.

Instantiate this class on the stack. Usually you will pass in all the required parameters by using one of its constructors, but you can also access its public data members directly.

Pass a reference to the instantiated class using CMFCControlRenderer::Create, which copies the parameters and stores them internally.

Example

The following example demonstrates how to use the construct a CMFCControlRendererInfo object. This code is part of the MSOffice2007Demo Sample: MFC Office Application.

// first parameter is resource string ID of the image 
    // second parameter is the default transparent color 
    // third parameter is the image rectangle 
    // fourth parameter is the image corners 
    // fifth parameter is the image sides 
    // sixth parameter is the inner image rectangle 
    // seventh parameter indicates that a check for 32-bit images with alpha channel is not required
    CMFCControlRendererInfo params(_T(""), CLR_DEFAULT, CRect(0, 0, 350, 60), CRect(83, 58, 266, 1), CRect(0, 0, 0, 0), CRect(0, 0, 0, 0), FALSE);

Inheritance Hierarchy

CMFCControlRendererInfo

Requirements

Header: afxcontrolrenderer.h

See Also

Concepts

MFC Hierarchy Chart

Other Resources

Classes (MFC Feature Pack)