다음을 통해 공유


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.

Syntax

class CDCRenderTarget : public CRenderTarget;  

Members

Public Constructors

Name Description
CDCRenderTarget::CDCRenderTarget Constructs a CDCRenderTarget object.

Public Methods

Name Description
CDCRenderTarget::Attach Attaches existing render target interface to the object
CDCRenderTarget::BindDC Binds the render target to the device context to which it issues drawing commands
CDCRenderTarget::Create Creates a CDCRenderTarget.
CDCRenderTarget::Detach Detaches render target interface from the object
CDCRenderTarget::GetDCRenderTarget Returns ID2D1DCRenderTarget interface

Public Operators

Name Description
CDCRenderTarget::operator ID2D1DCRenderTarget* Returns ID2D1DCRenderTarget interface

Protected Data Members

Name Description
CDCRenderTarget::m_pDCRenderTarget A pointer to an ID2D1DCRenderTarget object.

Inheritance Hierarchy

CObject

CRenderTarget

CDCRenderTarget

Requirements

Header: afxrendertarget.h

CDCRenderTarget::Attach

Attaches existing render target interface to the object

void Attach(ID2D1DCRenderTarget* pTarget);

Parameters

pTarget
Existing render target interface. Cannot be NULL

CDCRenderTarget::BindDC

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.

CDCRenderTarget::CDCRenderTarget

Constructs a CDCRenderTarget object.

CDCRenderTarget();

CDCRenderTarget::Create

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.

CDCRenderTarget::Detach

Detaches render target interface from the object

ID2D1DCRenderTarget* Detach();

Return Value

Pointer to detached render target interface.

CDCRenderTarget::GetDCRenderTarget

Returns ID2D1DCRenderTarget interface

ID2D1DCRenderTarget* GetDCRenderTarget();

Return Value

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

CDCRenderTarget::m_pDCRenderTarget

A pointer to an ID2D1DCRenderTarget object.

ID2D1DCRenderTarget* m_pDCRenderTarget;  

CDCRenderTarget::operator ID2D1DCRenderTarget*

Returns ID2D1DCRenderTarget interface

operator ID2D1DCRenderTarget*();

Return Value

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

See Also

Classes