Jonathan Livni
Jonathan Livni

Reputation: 107152

Cross-platform support for various MFC\ATL classes

I'm trying to keep my C++ project cross-platform as much as possible.
Albeit I do have dependencies on the following MFC\ATL classes: CString, CTime, CTimeSpan.

Is there an open implementation somewhere of MFC\ATL classes?
How common are these packages and should I use the open source libraries to start with, or should I wait until the need arises?

Upvotes: 2

Views: 1512

Answers (3)

user206705
user206705

Reputation:

While this proposal won't answer your cross platform requirement, it does meet the request for an "open implementation of MFC/ATL classes".

Check out the Windows Template Library(WTL).

Microsoft open sourced it some years ago, you can download it from its sourceforge project page, and it's also available from Microsoft's website somewhere.

The description from the SourceForge page: Windows Template Library (WTL) is a C++ library for developing Windows applications and UI components. It extends ATL (Active Template Library) and provides a set of classes for controls, dialogs, frame windows, GDI objects, and more.

Hope this helps!

Upvotes: 2

Inverse
Inverse

Reputation: 4476

Instead of CString use std::string

Instead of CTime use boost::ptime

Instead of CTimeSpan use boost::time_duration

Upvotes: 5

Diego Sevilla
Diego Sevilla

Reputation: 29021

I recommend not to rely in those classes. They are specific of MFC/ATL, and won't be easily ported to Unixes, for example. Try to build a separate conversion layer, and try to build around boost libraries, much more portable.

Upvotes: 1

Related Questions