Advertisement

MFC = ?

Started by April 29, 2000 03:48 AM
9 comments, last by CircusMunkee 24 years, 7 months ago
I keep seeing references to MFC and i have no idea what that means... Anyone care to enlighten me? Also, on the book Tricks of the Windows Game Programming Gurus : Fundamentals of 2D and 3D Game Programming, in reviews people say you should be knowledgeable in C. Is C++ ok for this book?
MFC = Microsoft Foundation Class

that means that you can use some Classes microsoft has invented to get messages instead of writing your own messages handling function.
i. e:

CButton::OnLButtonClick(CPoint Point, int nFlags)
this function will be called when someone left clicks in the buttons area..

I don''t know that book but:
If C is good for something, C++ must be good for it also, duh!
Advertisement
Hehe, thanks :-)

Anyone else know how to answer this:

I was looking around and I guess since new versions of directx are released all of the time, a lot of books are based on directx 5. Is it ok to learn with one of these books?
You can always use an older version of DirectX from the libraries of a newer version, but then again you would be limiting yourself to the older version, and may have to work hard in order to learn all the updates to the newer ( there are a few differences ). A book on DX5 may give you a good foundation, but you will eventually have to work yourself towards the most recent version anyway. I say if you have the option of going for a DX5 book or a DX7 ( most recent at time of writing... ) book, go DX7. If you honestly don''t have that option, go for the DX5, it''ll still give you what you''d need, but it might slow you down from upgrading to DX7.

- IO Fission

Tearing 'em apart for no particular reason...
To give more detail, MFC is a massive 200+ c++ class library developed by Microsoft to wrap the Windows API and provide an application framework to help design Windows applications. However, its not very useful in games as it is very big and slow. Its best use is for developing office type applications in the business world, and for that, it is probably the best class library available.
what are the advantages/disadvantages between using mfc and not? i would prefer to avoid it myself, but it''s just that i have a program that won''t compile if mfc is not set, and another program that complains if mfc IS set.

a2k
------------------General Equation, this is Private Function reporting for duty, sir!a2k
Advertisement
when you create your project, use win32 app and have it generate a blank, this way you don''t have to use MFC. If you do want to use MFC, don''t use stdafx.h because this includes all of the windows stuff, just include afx.h which has runtime type ids (CObject) and stuff like CPoint CRect ASSERT() etc
Don''t include stdafx.h? Why not. If you don''t like what it includes, change it. After all, it is a project file, not a system include.

There is really little point to not using precompiled headers when you have them available. You can setup to use stdafx.h or something different. It makes compiling MUCH faster.

Tim
To clear up a little misinformation: MFC is neither big ( when compiled right ) nor slow (if used right), but it really doesn''t have a lot of things in it that are useful for general game development, because you usually don''t need a document/view architecture, nor multiple windows.

I have 300kb apps with multiple windows and specialised controls that can do internet access and HTML parsing, so for certain things, thank you for MFC

#pragma DWIM // Do What I Mean!
~ Mad Keith ~
**I use Software Mode**
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
To answer the original question about Trick of the Windows game programming gurus, its fine to use C++ for that book. All of the code examples are written using libraries of functions instead of taking advantage of classes, but its pretty straight forward anyway. In fact, there is a little bit of C++ mentioned and used... but only a very little bit.

Speaking of DX5 vs DX7, my recommendation would be to read the book for the concepts of DirectX and then use the DX7 SDK along site it for the most recent code examples. I''ve found that drawing from these two sources gives me the best of both worlds: a very helpful and complete reference along with current source code.

Check out the GPI project today!

This topic is closed to new replies.

Advertisement