#define WIN32_LEAN_AND_MEAN

Started by
17 comments, last by MickePicke 21 years, 4 months ago
In VC you can easily check any definition by putting your mouse over it, right-click and select 'Go To Definition Of..'
I'm using VC for some time now, and I wonder why nobody brought this up. I think it's worth gold and gave me a lot of insight on the Win32 and DirectX API's.


Edit: For completeness I must add that this feature just as intellisense is weak and not always working properly. (I heard it was improved in the .NET versions, so /me thinks time to upgrade)

[edited by - Prototype on December 9, 2002 4:05:53 PM]
Advertisement
i only have one thing to say, KalvinB:

it''s not my fault that you don''t know what you''re doing.
"it''s not my fault that you don''t know what you''re doing."

And yet somehow I managed to get everything working exactly as it needed to be by actively NOT using any of your suggestions.

Anyone can copy your code from my GDI threads and see that it''s nonfunctioning crap. Anyone can see that you''re blatently wrong about everything in those threads.

You failed to mention GetBitmapBits which is ESSENTIAL if you''re going about what I was doing with CreateCompatibleBitmap. Are you even aware that GetBitmapBits only exists for compatibility? MSDN says flat out to use GetDIBits which doesn''t work with CreateCompatibleBitmap. I even TOLD YOU that GetObject doesn''t return the actual data to the bitmap structure and yet you INISISTED on using that method in your so called "answer" with source.

If you''re just going to post crap solutions to problems because you think someone should know the answer anyway then you should leave the forums because we don''t need members like you around misleading people who are honestly trying to learn how to do something.

And then blamming the person who asks the question for not knowing something because you toss out complete and utter crap and pretend it''s help.

That''s just obnoxious. Apparently I''m stepping in the middle of this whole thing because at least one other person who posted in one of my threads was aware you''re full of it. Well, now you''ve got a few more threads broadcasting that message.

I don''t care if you want to post crap answers or aren''t aware they''re crap but don''t blame me or ANYONE else for your ineptitude.

I''d rather get NO help than your kind of "help." Jerk.

Ben


IcarusIndie.com [ The Labyrinth | DevZone | The Wall | Hosting | Tiberian Merchandise | GameShot | Fun With Cutouts ]
Kalvin, you could also mail Niyaw you know... Wouldn''t clutter up this topic

Niyaw, if you want to reply to Kalvin, please do so by e-mail before this topic has to be closed due to flaming hazard ^_^

Now, as for on-topic: Are there more defines like this one? At first, I just thought it was there for no real purpose (saw it in OpenGL Game Programming for the first time). But it actually does something (still not sure WHAT, but it does something ^_^). Is it the only define of it''s kind, or are the more defines like this?
quote:
All this does is excludes some rarely-used stuff from being processed by the compiler. Specifically, the following header files are not included when WIN32_LEAN_AND_MEAN is defined:

cderr.h
dde.h
ddeml.h
dlgs.h
lzexpand.h
mmsystem.h
nb30.h
rpc.h
shellapi.h
winperf.h
winsock.h, mswsock.h, or winsock2.h
wincrypt.h
commdlg.h
winspool.h
ole.h or ole2.h
This information is found in windows.h lines 132-165.


Thats from winprog.org''s faq

-----------------------------
"It''s a damn poor mind that can think of only one way to spell a word!" -- Andrew Jackson
-----------------------------When men speak of the future, the Gods laugh.An apology for the devil: it must be remembered that we have heard one side of the case. God has written all the books.Samuel Butler (1835 - 1902)
its a flag read by the windows includes. so ifdef(blah blah blah) and if its not defined it will include MFC
I am soooo bad at this.
well not mfc.. but other stuff
I am soooo bad at this.
vc++ 6 got an option at project configuration that says "dont use mfc"

is this the same or do i still need WIN32_LEAN_AND_MEAN?
WIN32_LEAN_AND_MEAN excludes some stuff in the windows header for faster preprocessing, as several people said. If you want to know exactly what, look into the headers files and search for it or check your compiler documentation.

MFC requires some headers that WIN32_LEAN_AND_MEAN excludes but not using MFC doesn''t implicitely define that symbol.

As always, experimenting on your own will prove most useful.

[ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | Free C++ IDE. ]
[ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Boost C++ Lib ]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan

This topic is closed to new replies.

Advertisement