Unified CMarkup for STL and MFC

As of CMarkup release 9.0, CMarkup can be compiled for either MFC or STL strings (prior to 9.0, the CMarkupSTL class was separate from CMarkup). The primary result of merging these classes has been a lot more functionality for the STL version including UNICODE support and text encoding conversion functions.

Update September 27, 2008: With CMarkup release 10.0 things have gotten even simpler. For Visual C++ users, CMarkup no longer depends on tchar.h, and for others, CMarkup defaults to MARKUP_STL.

CMarkupSTL customers who are upgrading from versions earlier than 9.0 should do the following:

change places where you use the "CMarkupSTL" class name to "CMarkup"

include Markup.cpp and Markup.h in the project instead of MarkupSTL.cpp and MarkupSTL.h

if you are using Visual C++, put MARKUP_STL in your project compiler defines

The free Express edition of Microsoft Visual Studio 2005 does not include MFC or plain C++/Win32 Windows programming (Express only supports .NET and console apps), but it does include Microsoft's best STL support yet.

Pre-compiled headers in Visual Studio

Markup.cpp no longer calls #include "stdafx.h" which was specifically done for Visual Studio before CMarkup release 9.0. This means that now in Visual Studio, whether you are using MFC or STL, you must go into the project file precompiled headers settings for Markup.cpp and specify "not using" precompiled headers.

In release 9.0 the MARKUP_STDC define forced VC++ builds not to include tchar.h, but that has been completely removed in release 10.0.

Text defines

The unified CMarkup class isolates all the string and text differences into a series of MCD_ defines in the Markup.h header file. This allows you to control the way it is compiled on different platforms, and increases your build options. It even potentially shows you what would be required to use another string class instead of STL or MFC string classes!

Markup.h comes with text settings for UNICODE and non-UNICODE (i.e. either UTF-8 or MBCS).