Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

I'm currently working with C++ MFC applications in Visual Studio 2008. I have spent most of my time up to this point working with Java Swing development which seems to be not quite as involved as win32 or MFC are. I've noticed that there seems to be a lot of little parameters and specifications that go into creating even a simple element like a status bar or menu bar. I've spent a bit of time working through the MSDN library on the matter but it doesn't seem to explain why many of these parameters and such are needed to set up these elements. I always find that I'm able to wrap my head around things and remember them if I understand why I'm doing it. If you program using MFC (or a similar framework) what did you find helpful in the learning process? Do you recommend any website, books, or other references? Any and all advice is appreciated!

share|improve this question

closed as off-topic by MichaelT, Snowman, jwenting, Dan Pichelman, durron597 Sep 23 at 16:40

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – MichaelT, Snowman, jwenting, durron597
If this question can be reworded to fit the rules in the help center, please edit the question.

MFC is hard because it was developed for a 20-year-old version of the language, not because MFC is hard conceptually. –  DeadMG Oct 13 '11 at 14:58
It is more that it was developed for 20 year old hardware limits, when systems had 8MB Memory. At this time every bit counted and a windows clock app was possible with only 24kb, while GTK requires 2MB. –  Lothar Jan 22 '12 at 23:01

4 Answers 4

up vote 1 down vote accepted

I'm no MFC expert but have used it off and on over the last several years. It doesn't always follow a standard convention and is based a lot on the underlying Win-32 API. If your stint is short lived, you might want to look at Programming Windows with MFC (the link is for you read reviews, I'm not advocating the retailer)

If you are going to be using MFC for a while, learning the Win-32 API might not be a bad idea. Programming Windows is good. I read it long ago in the 16-bit days.

Using the MSDN can be confusing, but the MFC Class Hierarchy might be a good jump off point. When searching, I will preface any searches w/ "MSDN" and "MFC" then what you want.

This isn't exhaustive, but I hope it helps you to find some bearings.

To answer the unasked question: yes, working w/ MFC is 2-4 times slower than using Java, C# or similar.

share|improve this answer
Is C# similar to Java in terms of ease of window/app development? I know its kinda an apple to oranges kind of question... And thanks for pointing out the Class Hierarchy! I hadn't stumbled on that yet. It will be quite helpful! –  Kenneth Mar 22 '11 at 18:03
You can use C# and create WinForms apps that, when compared to MFC are far easier for most cases. The .NET framework is far more consistent and easier to follow IMHO. I can't really make the comparison to Java, as I have no experience. If I could choose between C# and WinForms or MFC, it would be C# hands down. –  DevSolo Mar 22 '11 at 18:13
I find MFC borderline unusable while c# winforms is easy. –  Kevin Oct 13 '11 at 15:11

I found MFC Internals by Shepherd/Wingo an excellent resource.

Covering the internals means it's not bogged down in beginner stuff and IDE explanations and it draws quite some lines between "raw" Win32 programming and using the MFC.

share|improve this answer

In the days of MFC, my go to book was:

The MFC Answer Book: Solutions for Effective Visual C++ Applications

Think of it as an MFC cookbook chock full of pragmatic MFC code that solves specific problems. Certainly remember dipping into this book with greater frequency than any other MFC book I owned.

share|improve this answer

MFC is hard to use and learn because it is something you could call a windows assembler language. Very very low level and almost not encapsulating anything. When you do serious development you often come up with your own application specific toolkit on top of MFC.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.