You can use this library in many ways, here we suggest a way of installing it and calling it from code.
C:\Development\MFCPlus or C:\Libraries\MFCPlus. Let's call it the MFCPlus root folder and represent it with MFXROOT.
MFXROOT\Include |
will contain the main header files |
MFXROOT\Src |
will contain all the source files and the detailed headers |
MFXROOT\Lib |
contains the lib files for all versions, both for static and dynamic libraries |
MFXROOT\Bin |
contains the compiled dll files |
SET PATH=C:\Libraries\MFCPlus\Bin;%PATH%;. Of course don't remove the other parts of the PATH environment variable already there.
With this installation the use of the library is straightforward, just add the include directive of the header of the package you need. It is better if these include directives are placed in the header that generates the precompiled header of your project so they are precompield and not parsed multiple times during builds. For example in the StdAfx.h header of your project (or any other header you are using for precompiled header):
#include <MFXFile.h>
#include <MFXApp.h>
#include <MFXDlg.h>
The headers will pass the names of the libraries to the linker. There are eight versions of the libraries depending on the following preprocessor flags:
| _AFXDLL |
This selects if to use the DLLs or the static libraries. When _AFXDLL is defined the MFC library is used as a DLL and so the MFCPlus libraries, when it is not defined the MFC is used as a static library and so the MFCPlus libraries.
|
| _DEBUG |
This selects the Debug or Release subconfigurations. If _DEBUG is defined then the debug versions are used and if it is not defined then the release versions are used. This happens for both the DLL and the static libraries.
|
| _UNICODE |
This selects the character model, if _UNICODE is defined the the Unicode versions are used, otherwise the ASCII versions are used.
|
The eight versions of the libraries are named with a three letter suffix as explained by the following table:
| Static/Dynamic | Debug/Release | Unicode/Ansi | Code |
|---|---|---|---|
| Static | Debug | Ansi | SDA |
| Static | Release | Ansi | SRA |
| Static | Debug | Unicode | SDU |
| Static | Release | Unicode | SRU |
| Dynamic | Debug | Ansi | DDA |
| Dynamic | Release | Ansi | DRA |
| Dynamic | Debug | Unicode | DDU |
| Dynamic | Release | Unicode | DRU |
Notice that the version of the C/C++ library is chosen according to the _AFXDLL and the _DEBUG flags:
| Static/Dynamic | Debug/Release | C/C++ library |
|---|---|---|
| Static | Debug | DEBUG_MULTI_THREAD |
| Static | Release | MULTI_THREAD |
| Dynamic | Debug | DEBUG_MULTI_THREAD_DLL |
| Dynamic | Release | MULTI_THREAD_DLL |
The _UNICODE flag selects the C/C++ libraries subversion as well.
Documentation |  License terms |  Pricing |  Demo | Home
Copyright 2009 www.softwaresphere.com