Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

CircusMunkee

MFC = ?

This topic is 6927 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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!

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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**

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!