
Alec Ross wrote:
In message <dgbrjk$k7r$1@sea.gmane.org>, Adam Badura <abadura@o2.pl> writes
2) using own classes instead of standard (most common for string) (wxWidgets and MFC for example)
wxWidgets has a wxString class: but you can use a std::string as well; and wxWidgets may well migrate to using std::string. Currently it is forward compatible, to the extent that it implements most of the std::string functions.
But I take the point that wxWidgets and MFC currently have native types that (approximately) duplicate the std versions.
Also, there is nothing stopping you doing: window.SetText( std::string( "Hello World" ).c_str()); and: ATL::CString text; window.GetText( text ); return std::string( static_cast< const char * >( text )); If you want to use TCHAR's: typedef std::basic_string< TCHAR > _tstring; so you could have: namespace boost { namespace gui { #if defined(BOOST_WINDOWS) || defined(BOOST_HAS_TCHAR) typedef std::basic_string< TCHAR > string; #else typedef std::string string; #endif }} Then you can use gui::string in a generic, cross-platform way. Granted, it is (slightly) more work, but there is no need to use the string types provided by a particular GUI framework. - Reece Haston Dunn Software Engineer, Sophos www.sophos.com