Chapter 4. Dealing with the MFC

Table of Contents
4.1. Introduction
4.2. Legal issues
4.3. Compiling the MFC

4.1. Introduction

To use the MFC in a Winelib application you will first have to recompile the MFC with Winelib. In theory it should be possible to write a wrapper for the Windows MFC as described in Building Winelib DLLs. But in practice it does not seem to be a realistic approach for the MFC:

  • the huge number of APIs makes writing the wrapper a big task in itself.

  • furthermore the MFC contain a huge number of APIs which are tricky to deal with when making a wrapper.

  • even once you have written the wrapper you will need to modify the MFC headers so that the compiler does not choke on them.

  • a big part of the MFC code is actually in your application in the form of macros. This means even more of the MFC headers have to actually work to in order for you to be able to compile an MFC based application.

This is why this guide includes a section dedicated to helping you compile the MFC with Winelib.