CDCRenderTarget Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at CDCRenderTarget Class.

A wrapper for ID2D1DCRenderTarget.

class CDCRenderTarget : public CRenderTarget;  

Public Constructors

NameDescription
CDCRenderTarget::CDCRenderTargetConstructs a CDCRenderTarget object.

Public Methods

NameDescription
CDCRenderTarget::AttachAttaches existing render target interface to the object
CDCRenderTarget::BindDCBinds the render target to the device context to which it issues drawing commands
CDCRenderTarget::CreateCreates a CDCRenderTarget.
CDCRenderTarget::DetachDetaches render target interface from the object
CDCRenderTarget::GetDCRenderTargetReturns ID2D1DCRenderTarget interface

Public Operators

NameDescription
CDCRenderTarget::operator ID2D1DCRenderTarget*Returns ID2D1DCRenderTarget interface

Protected Data Members

NameDescription
CDCRenderTarget::m_pDCRenderTargetA pointer to an ID2D1DCRenderTarget object.

CObject

CRenderTarget

CDCRenderTarget

Header: afxrendertarget.h

Attaches existing render target interface to the object

void Attach(ID2D1DCRenderTarget* pTarget);

Parameters

pTarget
Existing render target interface. Cannot be NULL

Binds the render target to the device context to which it issues drawing commands

BOOL BindDC(
    const CDC& dc,  
    const CRect& rect);

Parameters

dc
The device context to which the render target issues drawing commands

rect
The dimensions of the handle to a device context (HDC) to which the render target is bound

Return Value

If the method succeeds, it returns TRUE. Otherwise, it returns FALSE.

Constructs a CDCRenderTarget object.

CDCRenderTarget();

Creates a CDCRenderTarget.

BOOL Create(const D2D1_RENDER_TARGET_PROPERTIES& props);

Parameters

props
The rendering mode, pixel format, remoting options, DPI information, and the minimum DirectX support required for hardware rendering.

Return Value

If the method succeeds, it returns TRUE. Otherwise, it returns FALSE.

Detaches render target interface from the object

ID2D1DCRenderTarget* Detach();

Return Value

Pointer to detached render target interface.

Returns ID2D1DCRenderTarget interface

ID2D1DCRenderTarget* GetDCRenderTarget();

Return Value

Pointer to an ID2D1DCRenderTarget interface or NULL if object is not initialized yet.

A pointer to an ID2D1DCRenderTarget object.

ID2D1DCRenderTarget* m_pDCRenderTarget;  

Returns ID2D1DCRenderTarget interface

operator ID2D1DCRenderTarget*();

Return Value

Pointer to an ID2D1DCRenderTarget interface or NULL if object is not initialized yet.

Classes

Show: