windows.h is a C language header file provided by the good folks at Microsoft. It describes itself in a comment as the "Master include file for Windows applications." Fair enough: That's what it is.
It's mostly a laundry list of #includes; as far as I can recall (NB: I didn't recall far enough; JayBonci mentions commctrl.h below, and it's not the only one), there aren't any other Windows header files that you need to #include separately1. windows.h includes everything. Sure, that's excessive; we'll get to that in a few paragraphs.
There are a few #defines:
_WINDOWS_ is defined with no value; #if defined( _WINDOWS_ ), why then I guess that's where you are.
WINVER is the presumed version of Windows; it's a hex number where the third-from-lowest digit is the major version, and the other digits are, I suppose, increasingly minor versions or something. Win32's been using 0x0400 for years now, and I don't have any old 16-bit windows compilers right on hand to compare with.
_INC_WINDOWS: Damned if I know. It's undocumented.
_MIPS_, _ALPHA_, _PPC_: Ha ha. When NT4 was first released, it was supported on all of those processors in addition to x86. They started abandoning them, one by one, after a year or two; Alpha was the last to go. But the evidence lives on in the header file.
If you're annoyed by the promiscuous inclusiveness of the thing, you can #define WIN32_LEAN_AND_MEAN and it'll skip over a bunch of #includes, like for example shellapi.h and the ever-crucial dde.h (remember DDE? They're still supporting it . . . (NB: As JayBonci suggests, that is not a bad thing)) There's also a list of about forty "flags" that you can #define so as to exclude more specific sets of functions and/or #defines: NOKANJI, NOVIRTUALKEYCODES, etc. etc.
This is the Windows "philosophy", I suppose: Default to a blizzard of crap, and let more sophisticated users whittle away the unwanted excess. There is a bit of a contrast with standard C and C++ header files, where if you want something you'll need to go looking for it. stdlib.h has a lot of stuff in it, but it's hardly all-inclusive.
"windows.h is a C language header file provided by the good folks at Microsoft."
This is most odd because on my machine doing a #include "Windows.h" brings in the header file that allows me to get to all the juicy toolbox functions in Window Manager.
Aha! No it doesn't any more. All that juiciness is in "MacWindows.h" and "Windows.h" just includes that file instead. Guess all those poor people doing dual Windows/Macintosh development were getting confused. Poor luvs.
printable version chaos
Everything2 Help