The Windows.H Header File

The Windows.H header file is the one essential include file required in all Windows source code. The reason for this is simple: Windows.H contains all of the definitions for Windows messages, constants, flag values, data structures, macros, and other mnemonics that permit the programmer to work without having to memorize thousands of hexadecimal values and their functions.

For earlier versions of Windows, the Windows.H file has been a single, massive text file (about 10,000 lines). With later versions, the Windows.H file has shrunk; it now consists principally of a list of other include files, the most important of which is the WinUser.H include file. This include file is the current counterpart of the older Windows.H file and, like its predecessor, is more than 8000 lines in length.

NOTE

The following references to definitions provided by the Windows.H file may most likely be found in either the WinUser.H or WinDef.H files. Any of these references, however, may be located in other sources listed as include files in Windows.H.

If you are using MFC, the Windows.H header is included in the AppWizard-supplied STDAFX.H header as:

#define VC_EXTRALEAN       // Exclude rarely used stuff from Windows headers
#include <afxwin.h>        // MFC core and standard components
#include <afxext.h>        // MFC extensions
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>        // MFC support for Win98 common controls
#endif // _AFX_NO_AFXCMN_SUPPORT

© 1998 SYBEX Inc. All rights reserved.