win 32 in c++

October 26, 2010 at 21:22:34
Specs: Windows XP
#ifdef _WIN32
#include <windows.h>
#endif

cana anybody explain about win 32.. its saying that if win 32 is defined than include file fo window.. but in my hearder there is not win32 already defiend.. lz guide me in this regard


See More: win 32 in c++

Report •


#1
October 27, 2010 at 05:56:10
_WIN32 is a predefined constant in all current Visual C++ compilers running on Windows.

http://msdn.microsoft.com/en-us/library/b0084kay(VS.80).aspx


Report •

#2
October 27, 2010 at 12:59:37
If you're writing for just one platform, you should probably just include any header file you need:
#define WINVER 0x0500
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

How To Ask Questions The Smart Way


Report •

Related Solutions


Ask Question