Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: general MSVC comments

Author: Russell Reagan

Date: 19:30:41 11/05/02

Go up one level in this thread


On November 05, 2002 at 17:38:25, Brian Kostick wrote:

>You can limit MSVC's (windows.h) use of extra header files with:
>#define WIN32_LEAN_AND_MEAN
>as the first code line of your files.

Unless you are making a full blown Win32 windowed application (like a GUI) then
you probably don't need windows.h. For example, if you only include windows.h
because you want to use GetTickCount() to get the current time, you could
include winbase.h instead, which is much smaller than including windows.h. If
you look in windows.h it includes everything under the sun.

Also, a good resource for you would be http://msdn.microsoft.com. If you have a
question about an error, or want to know what header file to include for a
function, you can search for it there and it will give you lots of info about
it. For example, if you wanted to know what header file to include for
GetTickCount() you could search for GetTickCount and it would tell you that you
can include windows.h OR winbase.h, and if you have a look at winbase.h you
would see that it only includes 1 other file, and windows.h includes dozens of
other files, so you'd want to include winbase.h.

Russell



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.