Re: AfxMessageBox?




"Mihai N." <nmihai_year_2000@xxxxxxxxx> wrote in message
news:Xns98851565AE8FFMihaiN@xxxxxxxxxxxxxxxx
Because "Hello" and L"Hello" are both standard C/C++.
Making "Hello" to mean Unicode string means the compiler
is not standard compliant.

The MS compilers moved towards being more standard compliant lately
(and is a good thing).


I disagree. MS already has a compiler option to "treat chars as unsigned",
this new option "treat chars as wide" would be the same situation. And the
standards committees could make this a standard also.


Plus there are situations when one might want to use narrow strings
in an Unicode application. If "Hello" means Unicode, then what?



I suggest something like the ATL libraries have used XCHAR and YCHAR. These
change meaning depending on whether UNICODE is defined. XCHAR is like
TCHAR... YCHAR is the opposite of XCHAR, at least I think that's how it
works.

So if UNICODE is defined, "Hello" is Unicode, and Y"Hello" is ANSI. If
UNICODE is not defined, "Hello" is ANSI and Y"Hello" is Unicode. Both of
these are easier to type than _T("").


-- David


.



Relevant Pages

  • Re: When CString doesnt work
    ... because I would never code something that could not be put into Unicode unless ... >It's tempting to use CStrings throughout the back-end in order to gain ... compiler for their embedded work; they can't afford gcc because they need the fancy ... long as it's small and fast" and, of course, "it only compiles on our platform with our ...
    (microsoft.public.vc.mfc)
  • Re: CFile::Read problem ???
    ... As far as the C compiler is concerned, ... you can pretty much always assign a char ... as ASCII and wchar_t as Unicode. ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: Meanwhile, sounds like the unicode update is coming along ...
    ... half the story when it comes to "supporting" Unicode. ... and he will come/it will just work") is the database. ... good luck trying to store user input data in a non-Unicode database ... I don't think you would sensibly suggest we use a beta compiler to ...
    (borland.public.delphi.non-technical)
  • Re: Win32 API functions. Normal, Ansi, Unicode versions ?!
    ... > RegQueryValueEx(blablabla); ... Ansi version and once as the Unicode version. ... Delphi doesn't work that way. ... the compiler uses the compiled DCU instead of reprocessing ...
    (alt.comp.lang.borland-delphi)
  • Re: Unicode strings vs. traditional C strings
    ... Compiler does what you'd expect it to. ... internally with a char *, ... It's really only the Win32 API that is primarily UNICODE. ... T or F - A function such as strchrfor ANSI strings does not exist but I ...
    (microsoft.public.windowsce.embedded.vc)

Loading