Question

I am reading Charles Petzold's Programming windows. 5th Edition. And there is a statement to Windows.h file.

It said.

There is a WINNT.H file included in Windows.h file.

And the WINNT.H file used to define Unicode support.

But I can't find it in Visual Studio 8.0 Windows.h file.

And the file (WINNT.H) is not existing in Windows.h in VS 8.0, How can the Unicode support function be realized?

Was it helpful?

Solution

If you have the Visual C++ component of Visual Studio installed (i.e. if you can compile .cpp files), then you have WINNT.H. As well as Windows.h (which implicitly #include's WINNT.H for all Win32 targets).

It should be under "\includes" in your MSVS install directory.

In earlier versions of MSVS, 8-bit ASCII was the default, and you had to explictly "#define _UNICODE" (e.g. as a compile option). Newer versions (I believe starting in MSVS2005, but certainly now in MSVS2008 and MSVS2010), 16-bit Unicode is the default.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top