|
-
Jan 17th, 2002, 09:13 AM
#1
Thread Starter
Lively Member
#define WIN32_LEAN_AND_MEAN and stdafx
Hi,
What does the #define WIN32_LEAN_AND_MEAN define mean?
What will happen if I add this.
Also, what does the stdafx header file do, will it produce pre compiled headers for all the headers included in stdafx?
Also, why the afx part of the name?
Many thanks
-
Jan 17th, 2002, 09:31 AM
#2
Monday Morning Lunatic
It shouldn't have any effect on the final executable size, but it speeds up compilation by excluding stuff you don't really need.
stdafx.h was originally added into the MFC projects for the precompiled headers, but then in VC++6 they put it in all the projects.
PCH can seriously speed up compilation, but if you change the PCH header you have to recompile everything.
AFX == MFC. Don't know what it means, probably Application Effects or something
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jan 17th, 2002, 10:44 AM
#3
see this extract from windows.h:
Code:
#ifndef WIN32_LEAN_AND_MEAN
#include <cderr.h>
#include <dde.h>
#include <ddeml.h>
#include <dlgs.h>
#ifndef _MAC
#include <lzexpand.h>
#include <mmsystem.h>
#include <nb30.h>
#include <rpc.h>
#endif
#include <shellapi.h>
#ifndef _MAC
#include <winperf.h>
#if(_WIN32_WINNT >= 0x0400)
#include <winsock2.h>
#include <mswsock.h>
#else
#include <winsock.h>
#endif /* _WIN32_WINNT >= 0x0400 */
#endif /* WIN32_LEAN_AND_MEAN
and from these headers:
cderr.h - Common dialog error return codes
dde.h - Dynamic Data Exchange structures and definitions
ddeml.h - DDEML API header file (dynamic data exchange)
dlgs.h - This module contains the UI dialog header information.
lzdos.h - Public interface to LZEXP?.LIB. (data decompression library)
mmsystem.h -- Include file for Multimedia API's
nb30.h - This module contains the definitions for portable NetBIOS 3.0 support.
rpc.h - Master include file for RPC applications. (Microsoft Remote Procedure Call)
shellapi.h - SHELL.DLL functions, types, and definitions
winperf.h - Header file for the Performance Monitor data.
Winsock2.h -- definitions to be used with the WinSock 2 DLL
mswsock.h - This module contains the Microsoft-specific extensions to the Windows Sockets API.
Quite a lot 
AFX means application frameworks and was probably the developing name of MFC.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 17th, 2002, 10:47 AM
#4
Thread Starter
Lively Member
Thanks for the help guys,
I am having many difficulties moving from C on Unix to C++ windows. It's all these things that MS decide to add in for themselves, but it just seems to complicate in a lot of circumstances.
-
Jan 17th, 2002, 10:54 AM
#5
You won't get far in a GUI environment with the standard library only.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 17th, 2002, 11:49 AM
#6
Monday Morning Lunatic
MFC isn't required for writing windows programs. There are considerably better Standard Library-based methods of doing it (I'm currently working on one with the possibility of integrating it with what Kedaman's doing, hopefully in a cross-platform way).
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jan 17th, 2002, 11:51 AM
#7
Thread Starter
Lively Member
I have started using wxWindows, seems to do the job ok.
I havn't even touched MFC, been on a course on it, but the instructor basically said it was crap.
-
Jan 17th, 2002, 02:20 PM
#8
Monday Morning Lunatic
wxWindows does look good, especially when you get onto cross-platform development (I noticed how it looks very like MFC, but people like it more...hmmm).
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|