Archived

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

phil05

Win32 API vs MFC

Recommended Posts

MFC encapsulates the Win32 API as a set of objects. Using Win32 because it is "faster" than MFC is a poor choice IMO. For most GUI applications you can get away with using .NET anyway. MFC has its place, it just isn''t as big as it used to be.

Share this post


Link to post
Share on other sites
My attitude would be that MFC is likely to be deprecated soon, with M$ forcing developers to move either to .NET (Windows.Forms) or to go to third party toolkits (or indeed, drop down''n dirty to win32).

Games rarely use MFC, as far as I''m aware (perhaps they use some of its non-UI related components, but it seems unlikely). Of course they might do for their installers.

DirectX and stuff integrates with win32 stuff directly, I think. (although you can apply it to MFC by obtaining window handles etc?)

MFC -> not generally suitable for games + likely to go away soon
Win32 -> Low level, but used in games (well, their support libs anyway), NOT going to go away any time soon
Windows.Forms -> For .NET only (at the moment anyway), not generally suitable for games (maybe for installers etc).

Mark

Share this post


Link to post
Share on other sites
quote:
Original post by philvaira
...is everyone swaying over to MFC now?

No.

If you want to try the .NET-framwork (which I advice you to), I really recommed moving to C# becuase it is extremly messy to write .NET-applications in C++. If you want to experience .NET, experience it with C#.

Share this post


Link to post
Share on other sites
Win32, pretty much.

MFC is just a wrapper for Win32, to be used if you want fancy controls. If you just want a window to draw your own stuff on, there''s really no need for the MFC controls, and there''s certainly no need for the massive doc/view/CObject architecture, because you just want a window. MFC was meant to help make business type applications, not to make games.

-fel

Share this post


Link to post
Share on other sites
That makes sense. I suppose I''ll stick to Win32, yet I''m kinda mad that there''s not much tutorials online, considering they''re all just beginner intros.

Share this post


Link to post
Share on other sites
MFC is a popular developer''s choice for tool development, as it''s relatively easy to make a Windows application with all the bells and whistles and without the massive effort raw Win32 would take. You wouldn''t use it for games, since most games don''t require all the fancy controls. However, that''s not to say it doesn''t integrate nicely with either DirectX or OpenGL. There are several example applications included with the DirectX SDK (at least there used to be) demonstrating MFC DirectX applications. You would use this capability if you want to integrate your in-game rendering engine with your toolset, such as with a map editor or model viewer.

.NET also makes it easy to develop Windows applications, but some developers aren''t ready to make the switch to .NET and are quite happy with what they have. And, they don''t want to have to either learn a new language or the managed C++ extensions.

Share this post


Link to post
Share on other sites
quote:
Original post by philvaira
That makes sense. I suppose I'll stick to Win32, yet I'm kinda mad that there's not much tutorials online, considering they're all just beginner intros.


use MSDN after getting aquainted with some of the basics, such that can be found at winprog.net.

Once you have an idea of how the structure of almost any win32 program works, using MSDN plus forums when you're stumped is enough arsenal to take on your projects. Hope it helps.

EDIT: If you wanted to purchase a book however, The book Win32 Programming by Charles Petzold is arguably the source for learning windows programming. Others may recommend other books.

[edited by - nervo on May 25, 2004 9:17:56 PM]

Share this post


Link to post
Share on other sites