Export (0) Print
Expand All

GDI Interoperation Sample

This sample shows how DirectWrite can be integrated into an existing GDI application. A string is output by using GDI and the TextOut function, and then the same string is output using DirectWrite to render to the GDI surface using the GDI font.

For more information about interoperating with GDI see the Interoperating with GDI topic.

This topic has the following parts:

The following screen shot shows text string output from GDI and GDI/DirectWrite interoperation.

Screen shot of "Example text string." from GDI and GDI/DirectWrite interoperation

The GDI Interoperation Sample is composed of the following files.

File
GdiInterop.h
GdiTextRenderer.h
GdiInterop.cpp
GdiTextRenderer.cpp
Resource.h
GdiInterop.rc
GDIInterop.sln
GDIInterop.vcproj
ReadMe.txt
DeclareDPIAware.manifest

 

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\DirectWrite\GdiInterop
Code GalleryDownload from MSDN Code Gallery

 

 

 

Community Additions

ADD
Show:
© 2015 Microsoft