windows.h header?

What exactly does that header file #include <windows.h> entail? So far I know of the Sleep function, but that's about it.
You should ask at the guys in Windows Programming part of the forums.
And no, it has far more than sleep().
It includes all C++ functions which are specifically made to work with Windows. For example: Sleep(5000) will not work on a Mac, or Linux OS. This is the same with the other functions as well (Beep(), etc...). It's a compatability thing. I believe it also allows you to copy and paste into the DOS windows.
It contains most commonly used functions for WinAPI.

WinAPI is a MASSIVE platform SDK that contains any and all functions related to programming in the Windows environment. Everything from creating windows, to accessing the clipboard (copy/paste), to loading and drawing bitmaps, to browsing the file system, to a million other things.

Anything that any Windows program can do -- it does it through WinAPI (or through some other cross-platform library that uses WinAPI beneath it). Most of that functionality is bundled into one massive header file: <windows.h>. Very rarely do you need to #include other windows-specific headers.

About the only exception is high performance I/O, which is often done with libs like DirectX, OpenGL/OpenAL.
Last edited on
Alright thanks! I might start using WinAPI now, it sounds awesome! is it free?
omfg...

WinAPI literally means Win Application Programming Interface. Basically its built into the OS so that you can write programs to interact with the windows operating system, and use it's resources.

LOOK IT UP.

Sorry, but seriously: You have to at least try to look it up.
Last edited on
Chill out man.
@ OP: I don't know if you realize this, but just like .c and .cpp files, .h files are plain text files. They may look a little intimidating at first for a beginner but just keep in mind one day you'll understand all of it so power through and read what you can understand. Remember we're happy to answer any questions you have about calling convention declarations and confusing looking things like that.

EDIT: Yes, the WinAPI SDK is free to download and use. The licensing gets a little fuzzy for distribution I think, I haven't read it in a while, but don't worry about that right now: http://msdn.microsoft.com/en-US/windows/apps/br229516
Last edited on
Topic archived. No new replies allowed.