MFC or Win32?

Started by
10 comments, last by doctorsixstring 22 years, 6 months ago
I don''t mean to start any fires, but I want to find out which is better: MFC or Win32? MFC sounds like it is easier to learn, as it is a wrapper around win32. But if Win32 is just as easy to learn and just as fast to program in, I might as well learn that. Specifically, I want to learn more about making programs with windows interfaces (buttons, menus, dialog boxes, etc.) and not just fullscreen DirectX games. I plan on buying a book or two on windows programming, but I want to know if MFC is worth my time or if I should head straight to Win32.
Advertisement
You don''t want to say which one is better... you''ll get flamed. So, I''ll just say what I use.

Personally, I use Win32 just because I didn''t feel like messing with a class based Win32 wrapper, and another layer ontop of an API. Win32 isn''t hard at all to learn, and you can get toolbars, dialogs, status bars, etc, with minimal effort.

Some people will say MFC is the better choice, because it''s "quicker", but it all depends on what you learned I think.

Don''t resist RoastBeef - You know you''re hungry
Don't resist RoastBeef - You know you're hungry
Thanks for the reply RoastBeef. I didn''t really mean to ask which one is better, just easier to learn and implement. So basically it would take about the same time to learn and implement either MFC or Win32? In that case I would definetly skip the wrapper classes and go to Win32. Any other opinions?

P.S. What would be a really good Win32 book to buy?
I actually found implementing dialogs without MFC to be sort of intimidating (read, too hard to be worthwhile). Of course, there could be something I''m missing, as I''m hardly a Windows guru myself. Just for example, though, as nearly as I can tell CDialog (from which all other dialog classes are derived) _is_ one of the microsoft foundation classes. So how do you get all of that wonderful dialog functionality without invoking it? The method I use relies exclusively on MFC for all dialogs. This has the notable advantage that MFC dovetails really nicely with MSVC++. I''ve never bought a book on MFC (which is why my current method is sort of a bad hack ), but I think it might be worth your time to learn it.
-david
I personally tend to stick to Win32, however I agree with Muse that certain areas of MFC can be put to good use, so it''s something you should learn just in case, but i think Win32 is easier to play around with. That''s just me

Drew Sikora
A.K.A. Gaiiden

ICQ #: 70449988
AOLIM: DarkPylat

Blade Edge Software
Public Relations, Game Institute
Staff Member, GDNet

Online column - Design Corner at Pixelate
3-time Contributing author, Game Design Methods , Charles River Media (coming GDC 2002)

Drew Sikora
Executive Producer
GameDev.net

Here''s a book recommendation if you decide to go with the Win32 api.

Porgramming Windows Fifth Edition by Charles Petzold
It''s easier to get a window on the screen with MFC, and you can still use all the Win32 calls within an MFC app.

There''s also the WTL, which is sorta part of the ATL, which is a thin layer above Win32, whereas MFC also provides 2/3rds of a MVC (model, view, control) design with thier document-view architecture for SDI & MDI apps.

The tree-view control has a built-in method to display a directory, and there''s some other useful things such as that.

You still have to write a decent amount of code with MFC to get things to happen the way you want them too - implementing a page control for instance requires you to write code that handles the loading/swapping of frameless dialogs into a tab control much the same way you''d do it with Win32 API calls.

So learn them both, perhaps at the same time.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
i say learn both of them. i started out with just win32, and after about a year moved on to mfc. now that i am pretty good with both, i can switch back and forth the way i see fit. like for my direct x stuff, i still use win32. for my other apps, i use mfc. but you still use win32 with mfc, so its good to know both anyway. plus when you go to get a job, im sure it will look good that you know both. since people tend to be more win32 or more mfc, you will be more flexible and adapt quicker at your job, since you will probably have to go with there way of doing things. but i think they both are good.
Heya,

I tried to get grip on MFC for about 5 times I and everytime I had a program á la Paint in 5 minutes added some menu''s in the next 5 minutes. Quick and easy. But then I wanted something different..... and immediatly I got stuck! Why do all those books and tutorials cover simple MSPaint alike program''s??

Also, if you want to do stuff not included in MFC, you still have to get the handle and and do it ''the Win32 way''!

I think you better stick with Win32. Also imho you really should learn Win32 first, cause MFC is really just a wrapper.

Also I think for nice and cute ''windows alike'' programs, you may consider using Borland CBuilder. (Opinions??)

Gr,
BoRReL
MFC is about to die a horrible death, believe me, it''s true.
Once the .NET comes a knockin, we''ll all be clambering for a hold and MFC will begone, along with VB COM and MSDOS (sniff).

djsomers;)make it idiot proof and someone makes a better idiot!

This topic is closed to new replies.

Advertisement