Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ID2D1GdiInteropRenderTarget::GetDC method

Retrieves the device context associated with this render target.

Syntax


HRESULT GetDC(
        D2D1_DC_INITIALIZE_MODE mode,
  [out] HDC                     *hdc
);

Parameters

mode

Type: D2D1_DC_INITIALIZE_MODE

A value that specifies whether the device context should be cleared.

hdc [out]

Type: HDC*

When this method returns, contains the device context associated with this render target. You must allocate storage for this parameter.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Calling this method flushes the render target.

This command can be called only after BeginDraw and before EndDraw.

Note  In Windows 7 and earlier, you should not call GetDC between PushAxisAlignedClip/PopAxisAlignedClip commands or between PushLayer/PopLayer. However, this restriction does not apply to Windows 8 and later.

ReleaseDC must be called once for each call to GetDC.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps only]

Header

D2d1.h

Library

D2d1.lib

DLL

D2d1.dll

See also

ID2D1GdiInteropRenderTarget

 

 

Community Additions

ADD
Show:
© 2015 Microsoft