Talk:Microsoft Foundation Class Library

Down on MFC
hat it doesn't say is that MFC is an overgrown, macro-rigged, unmaintainable collection of old code that breaks all OOP rules, ignores C++ coding guidelines and must be hacked to write anything more complex than a demo application. Can someone say that in a polite way? - Sikon 13:43, 9 September 2005 (UTC)


 * Why? Wasn't your way polite enough? ;-)  I agree that MFC tends to incredibly bloat code, but I couldn't come up with a NPOV way of putting it.   &mdash; Frecklefoot | Talk 16:10, September 9, 2005 (UTC)


 * I agree that MFC bloats code, but I'd blame C++ as much as Microsoft. C++ isn't really suited for the Windows messaging model. The way Delphi does things is a lot more compact, because the language is written around the windows system.Westprog 12:17, 2 February 2007 (UTC)

mfc does not necessarily generate bloated code


IMHO, it is "baloney sandwich" to say "that MFC tends to incredibly bloat code". Sure, compared to asm86 and native C and the native win32 (and possibly "D" for a huge app).

I respectfully challenge anyone to come up with another:
 * 3rd generation
 * compiled to native asm86 language
 * within the top 100 of the TIOBE index
 * that can even come close to generating a smaller
 * and at least as fast
 * stand-alone
 * gui executable hello_world.exe
 * for a freshly installed "vanilla" Win98-FE computer ... (standalone assuming that mfc42.dll is present).

Another challenge ... and I would love to be wrong because I would advocate an eventual rewrite the freeware apps I have been part of ...

Show me an app that is as fast and has as much functionality in 208,896 bytes as an app I've worked on .... call it MyMfcDynamicallyLinkedApp.exe

Or MyBmhSixThreadConsoleSpeedTestAppDynamicallyLinked.exe in 90,112 bytes

I specifically insist that any candidate language include the size of any required .dll's and/or runtimes that must be included on a "vanilla" Win98-FE thru WinXP computer .... (not Vista which I have not used).

For more info, please check with MFC experts at this website: www.codeproject.org

(the baloney sandwiches you find in wikepedia.org .... frustrating &lt;g&gt;)

http://en.wikipedia.org/wiki/User:Mikeblas

Lynn 11:45, 2 May 2007 (UTC)

The page is Unstructured
The page is unstructured. Please group the info into various sections like history, advantages, criticisms etc. In that way, both positive and negative points can be presented in a npov way. --Soumyasch 09:19, 26 February 2006 (UTC)

still on MFC....
It should be pointed out that similar wrappers exist that are cross platform ie GTK QT wxWidgets etc... and make a point that even if MS is still supporting and patching MFC (last alterations in VC 8.0) resources and new up-to-date information and examples are becoming scarce as people start to using .NET as MS resources (or supported by) are realocated to promote the .NET framework (in a not so near future a C++ programer will be an oddity, one capable of doing something complex with MFC would be a rarety)...

plural or singular
just thought about, whether I have to set the verbs in the german article in plural, because the C don't stands for class but classes. Then I noticied that here also is written of "the MFC was..."


 * "MFC" is the name of a library, so it is singular in that usage. If you're talking about the classes of the library, I would say "MFC" is plural because there is more than one class.
 * Ah, that makes sense for me.
 * I linked with the MFC library.
 * You can use the MFC classes to solve your problem.
 * At that point, you start getting into wondering if the words in the sentence are redundant to the acronym.
 * --Mikeblas 21:17, 6 June 2006 (UTC)

Discrepancies between English article and other language articles
This article is very different from other language versions of wikipedia. For example, from the French version:

''The Microsoft Foundation Class (abridged in MFC) are a set of classes in C++ encapsulating the Win32 API (written in C) of Windows. His/her/its detractors blame him for his/her/its lack of abstraction of the Win32 API, as well as his/her/its lack of encapsulation, while his/her/its aficionados appreciates the possibility of has....''

Original:

''Les Microsoft Foundation Class (abrégé en MFC) sont un ensemble de classes en C++ encapsulant l'API Win32 (écrite en C) de Windows. Ses détracteurs lui reprochent son manque d'abstraction de l'API Win32, ainsi que son manque d'encapsulation, tandis que ses aficionados apprécient la possibilité d'a ''

http://fr.wikipedia.org/wiki/Microsoft_foundation_class

Obviously none of this is mentioned in this article.

Note: the translation is not mine. My French, which was once nearly fluent, now sucks. I used the Babylon translation, hence the rather awkward result. But the basic content is clear.

The Italian & German articles also mention controversy. Not being a programmer, and thus not knowing the history of MFC, I can't judge whether the other articles mention of "controversy" is irrelevant or POV; or, conversly, if the English article is incomplete by not mentioning it.

It is interesting that this is not noted in the English version.

PainMan 12:56, 15 August 2006 (UTC)

In the French, "Microsoft Foundation Class" is cited by the official name of the library, but interpreted (though not consistently) as grammatically plural, since it refers to a plurality of classes. The his/her/its construction is an artificial one, since in this case, it's referring to MFC, which is neuter, so "his" and "her" aren't applicable; it should be read as "its." "Abriged in" is a poor choice of words, used here to mean "abbreviated," referring to the acronym, "MFC". "Him" should be "it," probably mistranslated due to an inadequacy in computer translation. I don't know what generated the conflict in grammatical number between "aficionados" (plural) and "appreciates" (single). The translator certainly ought to have recognized the latter as the verb of which the former is the subject. No other parsing makes sense in the context.D021317c 01:39, 7 February 2007 (UTC)

Difficult to understand, defeats the purpose
This wikipedia entry is written in such a way that only people who already know the content will be able to understand the article, which seems to defeat the purpose.

Would?
"(many of these features – exceptions or run time type identification, for example – were not built into Microsoft's compiler at the time, but would appear in future versions)" I suspect "would appear" is used here to mean "did appear." D021317c 01:13, 7 February 2007 (UTC)
 * I guess you're right. -- Mikeblas 11:16, 7 February 2007 (UTC)

Some MFC Listed Advantages Need to Be Justified
'''C++ wrapper types for many common Windows resource-related data types that provide automatic closure of handles when the objects creating them go out of scope.'''

Not an advantage to .NET, since .NET provides a garbage collector.

provides utility classes such as CString and collection classes, which are usable even by console applications

.NET also provides such classes

capable IDE (integrated development environment) for debugging and code development

Many of the alternatives to MFC use the same IDE - Visual Studio, so how is this an advantage?

relatively small gui executables

Compared to what? (Definately not .NET or WinAPI)

alternatives to MFC either must link with that vendor's library, or supply a .dll

MFC uses .dlls included in the Windows OS. How is this an advantage?

integration with form designer to position controls

Not an advantage, since alternatives can take advantage of this development tool in the Visual Studio IDE (Including WinAPI and .NET).

large amount of resources available, from books to websites to sample code

Not an advantage also. The same is true for alternatives.

fast compilation speed

Compared to what? Not true when compared to .NET.

similar code base (but typically not completely the same) can be used for desktop and Pocket PC applications

.NET has the compact framework library for Pocket PCs.

--Jfrascencio 12:14, 2 March 2007 (UTC)


 * Some of your comparison results are off. MFC compiles to optimized native code, for example; while .NET compiles to IL, which is NGENed or JITted to native code; neither process results in code that is always as efficient as optimized native code. Close, sometimes; but not quite there yet. Comparing equal apps will show that the MFC app takes less memory, load faster, requires fewer (and smaller, in total) disk files, and so on; than a WinForms-based .NET applicaiton.


 * What you might be neglecting is that the comparison is to other tools in general. While I think you've not sufficiently analyzed the comparisons to .NET, the advantages listed here aren't striclty about comparing MFC to .NET; they're about comparing MFC use to other alternatives. -- Mikeblas 13:40, 2 March 2007 (UTC)


 * OTOH, it looks like some of the listed Disadvantages have some serious problems:


 * Does not provide a complete abstraction layer interface to the underlying Windows API, requiring custom Windows API code for those portions not covered by MFC.


 * Not providing a complete abstraction layer is actually an advantage. A complete abstraction layer would pin the developer to MFC, and it would be impossible for MFC to completely and currently wrap every single API in an efficient manner. Bugs in MFC would leave the programmer with literlaly nowhere to go.


 * .NET does a much better job at providing an object oriented, complete, natural, and well organized API.


 * This is simply false. Bugs and shortcomings in the .NET wrappers and reimplementations require far more intervention an rewrite than similar wrappers in MFC. Since .NET doesn't ship source code, developers are helpless to analyse or remedy problems in the frameworks.


 * Other bullets here are full of spin. It only makes sense, for example, that the Pocket PC versions of MFC aren't compatible with the desktop versions becasue the Pocket PC OS isn't fully compatible with the desktop OS.
 * -- Mikeblas 14:04, 2 March 2007 (UTC)

WTF is the Book List For?
Why do we need a list of books about MFC? Why not on the Windows page put every single book about Windows? Computer Guru 19:32, 6 March 2007 (UTC)


 * The Guide to layout recommends a "further reading" section, and I think the book list is meant to approach that goal. Your question about a list of Windows book is probably better suited for the Microsoft Windows talk page. -- Mikeblas 23:37, 11 April 2007 (UTC)

citation needed and


I am baffled why the public version shows all kinds of "citation needed" but when I look at the "edit" page there are all kinds of, such as "The future of MFC".

I was just looking at the MFC page because I was trying to figure out how to put a "citation needed" in an article about Spener and why it had a link to heraldry.

Lynn 07:26, 2 May 2007 (UTC)

What's new in MFC8 ?
Does anyone know ? —Preceding unsigned comment added by 195.189.218.66 (talk • contribs)
 * Search the web for "What's new in MFC 8", and I'm sure you'll find a few articles on it. -- Mikeblas 09:24, 10 May 2007 (UTC)

Some advantages/disadvantages comments

 * Should Pocket PC compatibility/incompatibility be listed as both an advantage and disadvantage?
 * The eat your own dogfood disadvantage is pretty much speculation: "it is not clear...". I'm always reluctant on including speculation as definite (dis)advantages. Although MS Office is listed as an example, WordPad is an example of an MFC application, and that's even shipped with the OS.
 * The "significant learning curve" sounds subjective; for example, it wasn't for me, and I have experience from Java and .NET to compare with at least. Once you know the basic classes and DocView model, there's mostly just a whole lot of helper classes for things like I/O, etc.
 * Fast compilation speed: In comparison to what? It's not faster than regular C++, and I can't say .NET or Java was much slower either. If this is to stay, it at least need to say what it's fast in comparison to.
 * Windows 3.x backporting: How common is it for API's to still offer support for Windows 3.1 backporting and how relevant is it to an article in this day and age? I think that point should simply be removed because it's no longer relevant. There's no significant crowd that wants Windows XP apps in MFC backported to Windows 3.1 today.

Thanks for reading. :-) I may adjust some of these in the future unless people think otherwise. &mdash; Northgrove 11:18, 10 August 2007 (UTC)

MFC disambiguation
hi all the MFC disambiguation page does not have a link directing to this page someone please do the needful thanks —Preceding unsigned comment added by 219.65.87.199 (talk) 18:14, 4 October 2007 (UTC)


 * Yes it does. It's under "computing". Ham Pastrami 11:25, 7 October 2007 (UTC)

Advantages and disadvantages
I'm not sure of the policy, but I'm pretty sure any advantages and disadvantages would be subjective. None of these are sourced. I left them here just so they're not deleted. Wikidan829 21:00, 10 October 2007 (UTC)

Advantages

 * Provides an object-oriented programming model to the Windows APIs.
 * C++ wrapper types for many common Windows resource-related data types that provide automatic closure of handles when the objects creating them go out of scope.
 * Provides a Document/View framework for creating Model-View-Controller-based architectures.
 * Provides utility classes such as CString and collection classes, which are usable even by console applications.
 * Faster executables than produced by interpreters like Visual Basic.
 * Generally faster executables than those produced by the .NET Framework.
 * Developer can use native Windows API seamlessly with MFC classes.
 * Capable IDE (integrated development environment) for debugging and code development.
 * Relatively small GUI executables, especially if the DLL version of MFC is used; executables do not require the end-user to download and install the .NET Framework, which is 22.4 MB. The current MFC redistributable package is 2.6 MB. (Statically linking to MFC adds a 250k-500k overhead for a typical application.)
 * Numerous wizards are available for a variety of tasks.
 * Integration with resource editor and, especially, the dialog box editor.
 * Large number of MFC developers, which means that its easier to get help and easier to hire someone who knows MFC.
 * Large amount of resources available, including books, websites, sample code and third party libraries
 * Fast compilation speed.
 * Similar code base (but typically not completely the same) can be used for desktop and Pocket PC applications.
 * MFC applications are easily migrated to newer versions.

Disadvantages

 * Minimally portable to other operating systems
 * Mainsoft has made MFC tools available for Unix ,
 * Microsoft shipped MFC versions for the Apple Macintosh operating systems in the 1990s. Visual Studio support for the Macintosh has since been discontinued.
 * Desktop and Pocket PC versions are similar, but not completely compatible
 * Migrating MFC applications back to Windows 3.x is problematic (though quite uncommon.)
 * Large library with a significant learning curve
 * Alternatives such as VCL, Visual Basic and C# provide rapid application development (RAD)
 * It is not clear to what extent Microsoft actually used MFC for internal development of the software they market (cf. Eating one's own dog food). For example, Microsoft reportedly uses C/C++ along with a specialized framework for most of the development of their Office suite.
 * Still requires varying degrees of knowledge of the underlying Windows API depending on how much non-MFC wrapped and custom Windows API code is needed.
 * Does not provide a complete abstraction layer interface to the underlying Windows API, requiring custom Windows API code for those portions not covered by MFC.
 * .NET does a much better job at providing a well organized, object oriented API.
 * Early versions of the MFC DLLs did not have names changed between revisions, resulting in DLL Hell problems. (This has been resolved with Visual Studio 2005 and MFC 8.0.)

Changed "MFC 9" to "MFCNext"
I saw the header was MFC 9, but the update is actually dubbed MFCNext. (Google it for Microsoft references) It is not MFC 9, as MFC 9 is already released with VS 2008 and has its own set of updates (a few more Vista controls, etc). MFCNext will be a MFC update on top of MFC 9. &mdash; Northgrove 09:44, 17 December 2007 (UTC)

Non Bias References
"Considered by some as the "de facto" industrial standard for commercial applications, BCGControlBar has received a hail storm of criticism[9] for poor quality and overall sluggish performance. While suitable for the hobbyist, many do not consider it an adequate solution for commercial application development, and have turned to solutions such as Codejock’s Toolkit Pro[10] or Prof-UIS[11]."

The first one is referring to the comments on a blog, search for keywords performance and quality and you will see where the criticism is found. The second two "references" are links to the websites of alternative MFC products. I think it is important to have a non bias approach here and list alternative MFC resources.


 * Who is the "some" that consider it a standard? Thats weasel wording and not allowed here. Be specific about who considers what.
 * Where is the proof that it is considered a "de facto industrial standard"?
 * Where is the proof that it has received a "hail storm of criticism"? I see only a comment that says there is no more feature in VC++ feature pack than bcg control bar. Thats the guys wishlist and hardly a criticism. Plus a blog comment does not count as a reliable source. Its not a valid reference.
 * Who is the "many" that do not consider it adequate solution? That too is weaselling. What we do not like, unless we are reliable enough to shape community's opinion, do not count as include-able criticism.
 * Listing alternate solutions is just advertising them over some product. Thats never done here and will not be done. We never say something is used over something else. The closest to this we do is the comparison. And comparisons are not even done in an article, rather separate articles are created. There we just list the features out in a table, and let the readers decide. We do not make the decision for the readers. What you are doing is not suitable here. --soum talk 18:21, 9 March 2008 (UTC)

RE: Non Bias References

 * Who is the "some" that consider it a standard? Thats weasel wording and not allowed here. Be specific about who considers what.

I agree with you, those "words" were not my own but another who updated this article to help promote BCGSoft. Glad to see them go. I left them there attempting to be non partial to BCG and other MFC products that I mentioned.


 * Where is the proof that it is considered a "de facto industrial standard"?

Again, this was not my wording, but another who was attempting to promote BCGSoft, glad to see them go.


 * Where is the proof that it has received a "hail storm of criticism"? I see only a comment that says there is no more feature in VC++ feature pack than bcg control bar.

There are many, many comments if you actually read thru the comments in that Blog. This was one of the first blogs that made mention of the new features in VC, and the comments relfect much of the developer community sentiment.

I was trying to be non partial overall, I feel that I have as much right to add legitimate content as you. It appears that Microsoft is paying you overtime today, you need to take a break from your obvious bias. There are more opnions out there then just yours! —Preceding unsigned comment added by 69.11.187.166 (talk) 19:33, 9 March 2008 (UTC)


 * Sorry but our opinions or even truth do not count here, but rather that it should be verifiable and by that it means that it should be backed up by reliable sources (which blog comments are not). Thats the policy here, and they are to be held. Provide reliable references and I will be more than happy to include them. Without that, I am sorry, but this does not count to be included here. --soum talk 19:40, 9 March 2008 (UTC)

Visual C++ Express edition and MFC
The article says on two places: Free C++ refactoring tools are also available, even for the Express editions (as a separate download). and The Visual Studio Express Editions do not include the MFC libraries (which can be obtained for free, as well, as a separate download, rc designers not included). Any links (or at least full names of that packages) ? —Preceding unsigned comment added by 62.245.72.103 (talk) 05:01, 26 March 2008 (UTC)

Minimum OS Requirements
MFC 10 applications do not seem to work on anything prior to XP SP2 but I can't find anything documented anywhere that confirms this. —Preceding unsigned comment added by 203.41.222.1 (talk) 01:01, 29 December 2010 (UTC)


 * VS2005 is the last version which supports anything older than XP SP2. This isn't because of MFC, it's the CRT. See http://developers.slashdot.org/story/11/12/14/1725205 and search for "2005" for more info. --67.64.66.99 (talk) 00:37, 20 January 2012 (UTC)

Visual C++ Redistributable für Visual Studio 2012 Update 4
New updated released on 2013-11-14. See http://www.microsoft.com/de-at/download/details.aspx?id=30679 — Preceding unsigned comment added by 80.123.117.50 (talk) 12:44, 31 January 2014 (UTC)

External links modified
Hello fellow Wikipedians,

I have just added archive links to 1 one external link on Microsoft Foundation Class Library. Please take a moment to review my edit. If necessary, add after the link to keep me from modifying it. Alternatively, you can add to keep me off the page altogether. I made the following changes:
 * Attempted to fix sourcing for http://www.microsoft.com/express/Support/Support-faq.aspx

When you have finished reviewing my changes, please set the checked parameter below to true to let others know.

Cheers. —cyberbot II  Talk to my owner :Online 00:05, 18 October 2015 (UTC)

External links modified
Hello fellow Wikipedians,

I have just added archive links to 1 one external link on Microsoft Foundation Class Library. Please take a moment to review my edit. If necessary, add after the link to keep me from modifying it. Alternatively, you can add to keep me off the page altogether. I made the following changes:
 * Added archive http://web.archive.org/web/20071024024526/http://msdn2.microsoft.com:80/en-us/visualc/aa442855.aspx to http://msdn2.microsoft.com/en-us/visualc/aa442855.aspx

When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at Sourcecheck).

Cheers.—cyberbot II  Talk to my owner :Online 05:22, 28 February 2016 (UTC)

External links modified
Hello fellow Wikipedians,

I have just added archive links to 1 one external link on Microsoft Foundation Class Library. Please take a moment to review my edit. If necessary, add after the link to keep me from modifying it. Alternatively, you can add to keep me off the page altogether. I made the following changes:
 * Added archive http://web.archive.org/web/20101026203218/http://www.microsoft.com:80/security/atl.aspx to http://www.microsoft.com/security/atl.aspx

When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at ).

Cheers.—cyberbot II  Talk to my owner :Online 23:31, 18 March 2016 (UTC)

MFC now included with the free version of Visual Studio
Microsoft does not appear to be calling the free development tools Express anymore and MFC is now included. — Preceding unsigned comment added by Hackwrench (talk • contribs) 01:57, 22 September 2016 (UTC)

Universal Windows Platform
How does Universal Windows Platform relate to MFC, would it be correct to say it is a modern replacement especially for app development? Should Universal Windows Platform be added under 'See Also' for starters? John a s (talk) 13:39, 20 August 2019 (UTC)