Okay. I would just add that if they have been defined correctly,
sizeof(TCHAR) should be 2.
Okay, thank you, Jonathan. I will stay with what I learned from MVP Mihai
Nita:
Or is this the same as including UNICODE,_UNICODE in the preprocessor
definitions under Settings?
Yes, is the same. Depending on what version of VS you are using, you
have to add the defines by hand as preprocessor directives ( VS6 and
older),
or just select Unicode build from a menu (VS2002/2003/2005).
---------
"Jonathan Wood" <jwood@softcircuits.com> wrote in message
news:OwTLKTojGHA.4044@TK2MSFTNGP03.phx.gbl...
Yes, 2 versions have been released since 6.0. Both of them use the
described switch to set the character set. I don't recall 6.0--haven't
used it for many, many years.
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
"Steve Russell" <srussell@removethisinnernet.net> wrote in message
news:uKCbOsnjGHA.3496@TK2MSFTNGP04.phx.gbl...
Are you describing something later than 6.0? I don't have such a
properties choice under Project in the menu.
-----------
"Jonathan Wood" <jwood@softcircuits.com> wrote in message
news:OHfBvmnjGHA.3620@TK2MSFTNGP02.phx.gbl...
Project | <appname> Properties | Configuration Properties | General |
Character Set. (Set to multibyte for non-Unicode.)
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
"Steve Russell" <srussell@removethisinnernet.net> wrote in message
news:ui%23uFumjGHA.5020@TK2MSFTNGP02.phx.gbl...
"Jonathan Wood" <jwood@softcircuits.com> wrote in message
news:%233CaklmjGHA.1508@TK2MSFTNGP04.phx.gbl...
Steve,
My apologies -- I did neglect to mention that the line number in the
error message referred to the AfxMessageBox line.
I added ",UNICODE,_UNICODE" under Project Settings / C/C++ /
Preprocessor / Preprocessor definitions.
A trace of sizeof(TCHAR) gives me 1.
Maybe this is leading to the same place as my other thread on
Unicode. Perhaps I am lacking something in defining UNICODE, but I
thought I had it all working.
If sizeof(TCHAR) is 1, then not everything is Unicode.
You can toggle the Unicode setting in the project properties dialog
box. There is a setting for the active character set. I STRONGLY urge
you to remove all the stuff you've added manually and use that
setting.
------------
Well, the fallacy in my measure of TCHAR is that the only way I could
run the program was to remove the Unicode entries in the Preprocessor
definitions.
By "project properties dialog box" do you mean the Project Settings?
Would you mind pointing me to the "toggle switch" you are referring
to?