Fog Creek Software
Discussion Board




MFC

Anyone know of an online courses in MFC?

John Doe
Monday, December 22, 2003

I myself am trying to learn MFC after a short stint a few years ago. Here are a few places I visit:

http://www.functionx.com/visualc/

http://www.codeguru.com

http://www.visionx.com/mfcpro/index.htp

Sathyaish Chakravarthy
Monday, December 22, 2003

Do you know the Win32 API already. If not, I suggest you
learn that first.

After learning the Win32 API, I suggest you don't learn
MFC.

rm -R /
Tuesday, December 23, 2003

MFC was crap 10 years ago. Compared to frameworks that are available today it is downright painful. Why do you want to learn it?

Craig
Tuesday, December 23, 2003

Isn't MFC used by Visual C++ programmers? If not, what other frameworks do they use?

John Doe
Tuesday, December 23, 2003

JD,

MFC certainly now falls into the category of legacy software. There is a large existing code base dependent on MFC that is still being actively developed, but very little new development is being done in MFC.

Much of modern Visual C++ development is centered around creating COM(+) or .Net components. In this way the greater flexibility and performance of C++ can be coupled with the ease of use of Visual Basic or other environments in Visual Studio.Net (although the C# and VB.Net both have enough performance and flexibility for many tasks).

If you're looking at creating applications strictly with Visual C++, take a look at:
1. Win32 application development (book by Charles Petzold are good for this)
2. ATL: This is primarily focused at creating and consuming COM components but does have some features related to window management, string manipulation, etc...

Frankly, MFC has turned into a bit of a nightmare. You can quickly develop certain kinds of applications with it; however, it ends up being difficult to extend and maintain because of its strange syntax and overgrown depth.

Plus, it has the scariest preprocessor macros ever written. In some cases, it looks like someone created a feature dependent on a macro just to show what they could do with the preprocessor.

Mark Smith
Tuesday, December 23, 2003

I have to disagree. MFC works great for developing Windows applications. It's harder to learn, but once you know it, it's as easy to use as Visual Basic.

CWinApp
Tuesday, December 23, 2003

Is it me or does it seem like Microsoft isn't providing much direction for new C++ programmers?  Even all the MS Press authors who wrote the best known C++ titles are now writing about C#.  They say they haven't abandoned it, but they don't really seem to be promoting it either.

anon
Tuesday, December 23, 2003

Managed C++.NET seems to be finally on par with C# in the next VS Whidbey release for 2004.

While I realize MFC is a horrible framework design wise, I have become proficient in it over the years to just not really care.  I can layer my own proper design patterns over it and am comfortable enough with it to be really productive.

However, the future is .NET, and in preparation for the next Windows release, I am embarking on my latest project in C# and managed C++ ...    In the next Windows release, the win32 api will be a layer on top of .NET

Yummy
Tuesday, December 23, 2003

Yes, Microsoft is no longer actively promoting C++.  C# is the official Microsoft language at this point, for all internal application development.  Realistically, this makes sense, as C# is a safer, more pleasant language than C++ for all but a few types of applications, and .net is central to the next version of Windows.  It's a bit scary, though, having such a huge change of direction.  Even the switch from MS-DOS to Windows 3.0 didn't involve a change of language for most people.  Microsoft is either going to come out on top or they'll open up the door for people to investigate alternatives to Windows.

Junkster
Tuesday, December 23, 2003

"In the next Windows release, the win32 api will be a layer on top of .NET" is incorrect. In the next release of Windows, .net will be a layer partially on top of the win32 API.  At some point way down the road this may flip-flop, however.

Junkster
Tuesday, December 23, 2003

" MFC works great for developing Windows applications. It's harder to learn, but once you know it, it's as easy to use as Visual Basic."

But for somebody who doesn't know it, is it worth it to take the time to learn it now, given that C# and other alternatives are available?

T. Norman
Tuesday, December 23, 2003

No, it would be a  waste of time to learn MFC now. (It always was, in my opinion, now vindicated, but that's another thread.)

If you want and need clean access, use C++ to the Win32 API. Otherwise use C# on top of .net.

WinMain
Wednesday, December 24, 2003


Is it worth knowing MFC to have a better understanding of
COM+  ?

CycleBurner
Wednesday, December 24, 2003

No, I'd say that you'd be better off learning ATL if you want to play with COM/COM+ more.

gaz
Wednesday, December 24, 2003

MFC is tightly engrained within application frameworks generated by the Visual C++ wizards.  If you plan on doing any gui development, MFC will be unavoidable.

Personally, I tried VS 2003 and the interface was so poorly designed, I reverted back to VC++ 6.0 and my trusty class wizard.

I am a shareware developer and as it stands now, I cannot require my customers to download a 30+ mb framework for my application to run.  I have too many people on Win2K/Win98 platforms.

Jim Jones
Wednesday, December 24, 2003

> If you plan on doing any gui development, MFC will be unavoidable.

That's not correct. C++ is fine for GUI's.

WinMain
Wednesday, December 24, 2003

*  Recent Topics

*  Fog Creek Home