Hi Dark,
Ummm...that's kind of my point though. There is no such thing as ascii
machines running Windows. Windows XP, Vista, Windows 7, etc all use
unicode characters not ascii by default. That's part of the reason why
programming in Microsoft Visual C++ using the Windows API is such a
pain in the tail. You can't use standard ascii character strings, but
must wrap the string using an unicode macro that converts the ascii
string to unicode before passing it to a function.  The SAPI Speak
function is a simple case in point.
In the old Dos and early Windows days you could use an ascii string
constant like
const char* message = "Hello world!";
and pass it to a function. Unfortunately, now that the Windows API is
all based on unicode you can't really do that. the ascii string "Hello
world!" has to be converted to an unicode string like
LPWCSTR message = TEXT ("Hello world!");
instead. The TEXT() macro basically takes "Hello world!" and converts
it from ascii to unicode and passes it to a Win API unicode string
constant which can then be passed to a function like THE  SAPI Speak
function as follows.
voice->Speak (message, 0, SPSF_Default);
So as I said earlier when it comes to Windows programming there is no
such thing as an ascii machine.  Everything is converted to unicode
before it gets passed to the Windows API. That goes for window titles,
 labels, error messages, whatever. It all gets converted to unicode
before it is displayed on screen or gets spoken by SAPI.  The major
difference between C++ and something like one of the .Net languages in
C++ you manually have to do the conversion yourself by passing ascii
characters through macros where the .Net Framework does it
automatically if you are using C# .Net or Visual Basic .Net.


Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
All messages are archived and can be searched and read at
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.

Reply via email to