Advertisement

why use MFC?

Started by February 11, 2000 06:13 PM
22 comments, last by Gecko 24 years, 6 months ago
Ho man, I guess I will put my two cents worth in as well

I have worked with the Win32 SDK and MFC for about 6 years, and most of my experience is with business applications. However, for the last two years I have been trying to change my focus to game programming by writing 3D graphics code as a hobby ( damn, someone hire me ).

This is my humble opinion.

As stated earlier, MFC is a tool, and like all tools it’s awesome for some things and cant be used for other things ( try driving a nail with a tooth pick, then you’ll understand ).

MFC is probably the best tool you will find to create an application with a standard GUI. If you want an MDI or SDI application with dialog boxes, combo boxes, list controls, tree controls, and so on and so forth, use MFC. However, I have never seen a product of any great size written without making some API calls. MFC doesn’t do everything and you will always have to resort to the Win32 API for some reason or another.

If you want to write a driver for a PCI card for Windows 2000, you probably shouldn’t try to use MFC ( I know someone who tried and it wasn''t pretty ). Use strait C++, SDK and, DDK.

If you want a kick-ass 3D application, again, MFC is not what you want. MFC is cool because it does so much for you, but for the same reason, it’s hard to create a highly specialized and optimized application. This is not to say it can’t be done, because it can, but what you would get for your effort just would not be worth the time.

Use MFC to create applications that have a standard GUI and use straight C++ and SDK to create specialized applications such as real-time 3D engines.

That’s my humble opinion.
Delisk, tell me you''re not programming in Visual J++
it''s a sacrilege, it makes a mockery of virtually everything Java is. It''s still completely object based, but it''s platform specific. Just more of Bill trying to take over the world.. long live Sun..
anyway, i agree with most of the posts. MFC is very powerful and useful in its place. it has a hell of alot of power that you''ll never need programming most, if not all, games. it''s simply overkill, as well as being a bit slower. granted, i don''t know much MFC, but i plan on learning. I''ve played around with the AppWizards in VC++, and must say that i don''t like them much. i find it easier just to write all the code, rather than try to figure what the Wizard did.. we''re off to see the wizard...
Advertisement
ahh. thanks for responding everybody, i feel enlightened now ;-)

now for my next question:
lets say i have a game that has a menu system (assuming using the win32 menus, not writing my own), but i don''t want to code all the buttons and windows and stuff. can i use MFC just for that, and the regular API everywhere else? this might sound like a dumb question, but i''ve never used MFC and am not sure how its set up.


_________________Gecko___

_________________Gecko___Gecko Design
You should use the resource editor if you want to make it the easy way.

As for the conversation which has been going on for quite a while.

MFC -> easy for business applications, and good for starting programming. But after you learned all the bits of it and want to go on to Win32 programming, you''ll find that you need to learn everything from scratch again. I should say that you can see it as a totally new language.....derived from win32. But like has been said.......they are tools.
Every programming language is a tool, but....people always look at these tools at what they can do, and especially how fast it is, how it optimises code.

In fact, everything is about speed. Business rograms don''t really need speed, but obviously games do. What programming language is fast enough for games, Win32.......exactly, so, game programmers''ll choose for win32. Business programmers wil say .......win32, what for/ MFC is way better.



Dance with me......

http://members.xoom.com/CJdeVos/index.htm

This topic is closed to new replies.

Advertisement