65.9K
CodeProject is changing. Read more.
Home

EMF to WMF conversion using GDI+

starIconstarIcon
emptyStarIcon
starIcon
emptyStarIconemptyStarIcon

2.80/5 (8 votes)

Jun 21, 2005

viewsIcon

62440

downloadIcon

1144

A simple program that converts EMF to WMF using GDI+. This project can also be used as a simple kick-off for a console GDI+ program.

Sample Image

Introduction

This program reads a graphics file in EMF format and writes it out as WMF. It can be useful as a basic command line tool or as a starting off point for writing a GDI+ program. It also has an example of char to wchar string conversion.

Background

A legacy application I support requires WMF as input. One day the upstream application that provides graphical input was "upgraded" and started producing EMF files instead of WMF files. Having spent some time away from C++ and GDI+, it was not a simple process to cobble together this simple program in a format. The bulk of the program was taken from an MSDN example, but actually getting it to compile and link was the majority of the time sink. I used some examples from CodeProject to get me started, but what was missing was a simple tiny toy console project and solution that worked.