🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

MFC, Win32, GDI..............oh my.

Started by
4 comments, last by Sinner_Zero 22 years, 7 months ago
Ok, which are which and what is what. Because I''m thuroughly confused, for now all I''ve done was use windows.h and windowsx.h and like making window stuff and pixels and bmp''s (all from Game Programming Genesis tutorial) but I don''t know what I''m exacly using, other than the 2 headers...I mean, WTF is MFC, Win32, or GDI. GDI having been mentioned in the tutorial, I believe to be specific as Windows GDI. Please, can someone explain.
Advertisement
It''s all the same thing basically.

MFC is WIN32 and GDI wrapped in classes.

// sorta like...
class MFC_classes
{
WIN32 funcs;
GDI graphics;
};

GDI are the graphics part of WIN32, I belive it stands for GraphicsDeviceInterface
C++, C++, C++
MFC(Microsoft Foundation Classes) is a C++ class framework built on top of the Win32 API to make it easier to build Windows applications. The library is somewhat old(1992, I think), and in some people''s opinions it does _not_ represent the ultimate in framework design.
GDI(Graphics Device Interface) is the part of the Win32 API dedicated to graphics operations. Eg all the DrawThis and DrawThat functions.

"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." - - Stephen Roberts
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
ROFL, so me learning GDI here, lol, ok, wait you say MFC is old, it''s updated aint it, I mean if MFC is old Win32 is older, I mean I don''t think they would write new books on something that old, then again fortran is still around..... the one language I don''t know anything about so I assume its old and useless =D

Ok, so I leaern MFC cuz it easy, then like go into more specific Win32/GDI? does that make sense?
Well as theForger suggests on www.winprog.org (have a look at his Windows Programming FAQ and Tutorial, they´re great!) you should first get a firm foundation on Win32 API before you learn MFC. MFC is just a wrapper for all the Win32 Functions, but also introduces some new paradigms like a document / view architecture.

If I were you (but I´m not so the decision is entirely yours) I´d learn the Win32 API first to get a basic knowledge of how Windows works "under the hood" before proceeding on to MFC.
If you´re serious about coding applications for windows, MFC is the way to go, just be sure to learn the basics (Win32 API) first. When something goes wrong / doesn´t work as intended with MFC (and that will be the case) you can always resort to Win32.
Besides, every functionality the Windows OS offers is covered in the Win32 API somewhere.

And GDI is just a part of the Win32 API, namely the functions and structures for drawing stuff on a screen, bitmap or on a printer.

And yes, the Win32 API is old, thats because its the very foundation upon which the windows operating system is built on. It doesn´t get any more low-level than this. But because it´s that old it´s laid out with structural programming in mind, whereas the MFC is object-oriented.

Advantages of the Win32 API are that programs are leaner, faster and smaller than those created with MFC. That´s also why games generally use the Win32 API instead of MFC.

Advantages of the MFC are that you´ve got a lot of functionality already covered that you´d have to implement yourself otherwise. It also tremendously speeds up application development because you can use so many pre-built parts and objects for your app.
Kick ass!

I mean cool, that makes sense, and I completely agree and you are me (I don''t wanna disagree now).

Thnx a ton, I''ll post again if I need anything =), though I assume I won''t need any books on Win32 if those tuts are as good as you say.

This topic is closed to new replies.

Advertisement