Re: AfxMessageBox?



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.
Not the same case. The standard does not specify if the chars are signed or
not.

And the standards committees could make this a standard also.
Ok then, MS is waiting for this to happen.


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("").
This means that you have to be aware and write your code with Y,
instead of _T. Back to square 1.


--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
.



Relevant Pages

  • Re: C90 penetration
    ... and just specify that the "precision" ... A bit-field whose size is CHAR_BIT, can certainly be represented by a char; bit fields of a larger size clearly cannot be represented as a single char. ... Also, the standard requires that if a bit field with a width of 3 is followed by a bit field with a width of 4, then if there's enough room in the allocation unit, they must be allocated in adjacent bits within that allocation unit; that's pretty hard to do if you implement them as chars. ...
    (comp.lang.c)
  • aus and chars (was: CMOVE wrong?)
    ... (except on word-addressed machines). ... : ALLOT CHARS ALLOT; ... future standard systems (apart from that demonstration system by Jack ... based on) are also variable-width with byte granularity. ...
    (comp.lang.forth)
  • Re: char and au size
    ... 1, and all supported Forth-94 systems implement this, so it might be a ... supports several platforms for which chars and AU are different, ... So we won't see standard systems on such small machines, ...
    (comp.lang.forth)
  • Re: to calculate bitsize of a byte
    ... very common) the C standard requires chars to be at least 8 bits. ... this case the most significant bit is not a padding bit, ... ignored by the compiler author. ...
    (comp.lang.c)
  • Re: An Observation
    ... because of the sloppiness of the standard. ... All I need is to redefine all the words that use chars ... CHARS CONSTANT COUNT CREATE ENVIRONMENT? ... have to compact the strings since I can't rewrite them from scratch ...
    (comp.lang.forth)