CMFCControlRenderer Class

A helper class that handles image rendering.

class CMFCControlRenderer : public CObject

Members

Public Constructors

Name

Description

CMFCControlRenderer::CMFCControlRenderer

Constructs a CMFCControlRenderer object.

CMFCControlRenderer::~CMFCControlRenderer

Destructor.

Public Methods

Name

Description

CMFCControlRenderer::CleanUp

Frees internal resources.

CMFCControlRenderer::Create

Initializes a control renderer object. You can call this method repeatedly to re-create the control renderer with different parameters.

CMFCControlRenderer::CreateObject

Used by the framework to create a dynamic instance of this class type.

CMFCControlRenderer::Draw

Selects an image from the internal image list and draws it in the specified rectangle.

CMFCControlRenderer::DrawFrame

Draws a frame that is selected from the internal image list.

CMFCControlRenderer::FillInterior

Fills the interior of a rectangle with the interior of an image from the image list.

CMFCControlRenderer::GetImageCount

Returns the number of images in the internal image list.

CMFCControlRenderer::GetParams

Returns a reference to the CMFCControlRendererInfo Class object that was specified in CMFCControlRenderer::Create.

CMFCControlRenderer::GetThisClass

Used by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type.

CMFCControlRenderer::IsMirror

Specifies whether the internal image list is mirrored.

CMFCControlRenderer::IsValid

Specifies whether the control renderer is valid.

CMFCControlRenderer::Mirror

Mirrors the internal image list.

CMFCControlRenderer::OnSysColorChange

Handles the WM_SYSCOLORCHANGE message.

Remarks

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

To create a CMFCControlRenderer, construct the object and then call Create, passing in a reference to a CMFCControlRendererInfo object. The CMFCControlRendererInfo object can either be read from an XML file or created manually.

A CMFCControlRenderer object holds a reference to either a single internal image or an internal image list. You can render individual images from this image list by calling Draw, DrawFrame, and FillInterior.

You can re-create a CMFCControlRenderer object by calling Create again and using different parameters.

CMFCControlRenderer implements sophisticated drawing algorithms. It can draw all or part of an image; align, flip, or mirror the image; or use the alpha channel for transparency.

Inheritance Hierarchy

CObject

   CMFCControlRenderer

Requirements

Header: afxcontrolrenderer.h

See Also

Concepts

MFC Hierarchy Chart

Other Resources

Classes (MFC Feature Pack)