Re: Using CString on a platform without MFC or OLE - Howto?



Yes, that is a possibility.

I take it that Dinkumware wrote the MS STL, so perhaps it could drop into CE fairly easily (and enhance my STL as needed to support the CStdString class).

My main concern is that I'm using VC8 (ie. VS.NET 2005 B2) and I doubt they've updated there library for this yet.

Tom.

Paul G. Tobey [eMVP] wrote:
There's no off-the-shelf-from-Microsoft solution to your problem that I've heard of, no. If there are other things that you're doing that might need the STL, you can get the Dinkumware version, which I've used because I use iostreams and which works very nicely on CE.

Paul T.

"Qwavel" <Qwavel@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:5B87D09D-13EA-4814-9669-3DC7900A2F6C@xxxxxxxxxxxxxxxx

I'm converting a bunch of Win32 code.
The existing code uses the STL and CString, but not MFC or ATL.
It would be easier to write my own CString class than to rewrite the
existing code, and I might have to do that but I'd rather check here first.


Tom.

"Paul G. Tobey [eMVP]" wrote:


"Don't use CString" is my first suggestion. What's wrong with just using an
array of TCHARs? If you feel that you must use the full power of C++, write
your own String class. It's not super difficult.


Paul T.

"Qwavel" <Qwavel@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:FE40285C-4C0C-4907-8596-1F9BD1AD0228@xxxxxxxxxxxxxxxx

I need some sort of CString, but my WinCE platform doesn't support MFC and
doesn't support OLE so I can't use the ATL version of CString.


If I try to include "cstringt.h" or "atlstr.h" then I get an error that
explains that I can't because "This Windows CE SDK does not support
mini-COM
with OLE...".

Why does CString depend on OLE?

Normally I would use CStdString.h which is a great CString replacement
that
works (almost) everywhere. But this class depends on the standard library
and the WinCE library is non-conformant (it is missing locale) so that
class
doesn't work.


Any suggestions?

Thanks.





.



Relevant Pages

  • Re: stl and iostream for eVC++ 4 (sp3)
    ... We are also using Dinkumware (since no-one else seemed to offer full STL ... support) and have successfully ported VC++ to CE. ... > for the iostreams support. ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: C++ Standard Library
    ... Surprisingly, not only does my customer base not want STL, they don't usually want ... 8-bit and 16-bit characters under std::string, and how to move them in and out of CString. ...
    (microsoft.public.vc.mfc)
  • Re: choose evc or vs2005
    ... I use STL for CE from Visual Studio 2005 and it is ok. ... I haven't seen any reason to switch to eVC 4, let alone VS 2005 or VS ... For example, extensive usage of templates. ... overwhelming reason (like need to support devices not supported by VS ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: STL for Windows CE: compilation problems on VS2005
    ... I try to explain better my situation: I'm using a WTL grid (available from the files section of WTL support list on yahoo), that internally uses map and vector classes, and these are the only references to STL stuff in my application. ... Actually the c++ exceptions are not a real problem, I just get a bigger exe, so we can forget it. ... The STL for Windows CE port could be an easy solution, but I can't compile it under Visual Studio 2005. ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: C++ Standard Library
    ... Unicode. ... CStrings and 8-bit CStrings, as well as the generic CString which is based on the the ... I use MFC classes from habit, and largely because my customer base doesn't want STL. ... that wouldn't work under a shared MFC DLL scenario. ...
    (microsoft.public.vc.mfc)