Simple Direct2D Application Sample

This topic contains the following sections.


This sample creates a simple Direct2D application that draws shapes, images, and text. It produces the output shown in the following screen shot.

Screen shot of the sample application with two hourglass shapes, “Hello World!” text, and two bitmaps of trees


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.

Windows SDK\Program Files\Microsoft SDKs\Windows\v7.0\Samples\Multimedia\Direct2D\SimpleDirect2dApplication
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 SimpleDirect2dApplication.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.



Send comments about this topic to Microsoft

Build date: 1/22/2012

Community Additions