Export (0) Print
Expand All
6 out of 8 rated this helpful - Rate this topic

Direct2D GDI Interop Sample

This topic contains the following sections.

Description

This sample shows how to draw Direct2D content to a GDI Device Context (DC). It produces the output shown in the following screen shot.

Screen shot of a pie chart drawn by Direct2D and a pie chart drawn by GDI

Requirements

Minimum supported clientWindows 7 or Windows Vista with Service Pack 2 (SP2) and Platform Update for Windows Vista
Minimum supported serverWindows Server 2008 R2 or Windows Server 2008 with Service Pack 2 (SP2) and Platform Update for Windows Server 2008
Windows SDKWindows Software Development Kit (SDK) for Windows 7

 

Downloading the Sample

This sample is available in the following locations.

LocationPath/URL
Windows SDK\Program Files\Microsoft SDKs\Windows\v7.0\Samples\Multimedia\Direct2D\GdiInteropSample
Code GalleryDownload from MSDN Code Gallery

 

Building the Sample

Building the Sample Using the Command Prompt

  1. Open the Command Prompt window and navigate to the sample directory.
  2. Type msbuild GdiInteropSample.sln.

Building the Sample Using Visual Studio 2008 (Preferred Method)

  1. Open Windows Explorer and navigate to the sample directory.
  2. Double-click the icon for the .sln (solution) file to open the file in Visual Studio.
  3. In the Build menu, select Build Solution. The application will be built in the default \Debug or \Release directory.

Related topics

Direct2D and GDI Interoperability Overview
ID2D1DCRenderTarget

 

 

Send comments about this topic to Microsoft

Build date: 9/6/2011

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.