Re: Basic question : Replacing CString when moving from MFC to Win32

From: KS (ks_at_blah.com)
Date: 02/19/04


Date: Thu, 19 Feb 2004 13:09:29 -0700

You have to be careful when converting, because alot of PocketPC function
use UNICODE values (wide, ie LPWSTR). I've used CString alot for Pocket PC
and haven't had any memory problems. Not sure how much overhead CString
uses, but I doubt a lot. I've coded alot of classes that are cross platform
by using either CString or TCHAR.

KS

"John Sway" <john@aol.com> wrote in message
news:ekOLbFy9DHA.2804@TK2MSFTNGP09.phx.gbl...
> We are porting one of our MFC apps to Pocket PC and Smartphone devices.
Due
> to disk and memory constraints, we cannot use MFC for these platforms.
>
> So I have to convert our MFC-based objects into plain Win32 classes. My
> question is what string type do you use for replacing MFC's CString? For
> example, if my MFC class is :
>
> class CPerson : public CObject
> {
> CString m_strFirstName;
> CString m_strLastName;
> }
>
> How would I write this in Win32? I realize, the CObject will have to go.
>
> Regarding the strings, will they be defined as LPCTSTR or LPTSTR? Does it
> make any difference? Also, is there any "base" class like CObject in Win32
> that will help when serializing our data?
>
> Thanks!
>
>



Relevant Pages

  • Re: Basic question : Replacing CString when moving from MFC to Win32
    ... I've used CString alot for Pocket PC ... > We are porting one of our MFC apps to Pocket PC and Smartphone devices. ...
    (microsoft.public.pocketpc.developer)
  • Re: Quick burnout on Intelli tuner batteries?
    ... I've got two that have been used quite alot and no problems. ... left them in gig bags, my pocket, cases, etc, no problem. ... My favorite tuner so far. ...
    (rec.music.makers.guitar.acoustic)
  • Re: GPS Software
    ... Here is a link to alot more information as well ... > Hi Does anyone know if there is GPS software for the Pocket PC. ... Prev by Date: ...
    (microsoft.public.pocketpc.phone_edition)
  • running cryptophone???
    ... has anybody tried to build and run cryptophone on there Pocket PC. ... source code is available online and there are alot of steps to be ... It includes building a cross compiler then some gmp and alot of other ...
    (microsoft.public.dotnet.framework.compactframework)

Loading