Does Microsoft internally use MFC for writing Windows apps?

Craig Ward figures that if he asks enough questions I might answer one of them. "Does Microsoft internally use MFC for writing Windows apps? How about VB?"

People use whatever they decide best meets the requirements for the task at hand. That could be a batch file, a C++ program, a perl script, a web page with a bunch of JScript, use your imagination. Is the number of solutions that use MFC and VB nonzero? I don't know for sure (I'm not in the habit of taking all the programs I see and trying to figure out what language they're written in), but I'd be very surprised if somebody somewhere hasn't thrown together an MFC or VB program to do something, be it a test suite, an install script, a graphical interface over a complicated command-line tool, or something else. It's a big company. I understand that in some parts of the company they even use Macintoshes.

I'm not going to go into details of specific projects because (3) I am not authorized to talk about it. (I gave reasons one and two two years ago.)

Comments (38)
  1. kiwiblue says:

    Not sure about exact meaning of "use internally", but on XP WordPad and Paint are both MFC.

  2. Nish says:

    I bet they don’t use Delphi at Microsoft ;-)

  3. John Topley says:

    "I bet they don’t use Delphi at Microsoft ;-)"

    No, they just bought Anders Hejlsberg instead. Actually there was an MS app a few years ago that someone discovered was written using Delphi. I think it was an installer or demoware but I can’t remember the specifics.

  4. Jim Kueneman says:

    Hi John!

     Remember me from GXExplorer!

     Turns out you don’t get many responses from MS people in the newsgroups either if they know you use Delphi :^).   Most MVP’s will help you out though.


  5. Cody says:

    He was probably taking "Whoa, new toys!" pictures and failed to realize that he was breaking security policy (thus deserving his fate.)

  6. Russ Paul-Jones says:

    About 9 versions of Microsoft Money were built on MFC.

  7. Wordpad is interesting in that it is a sample app that ships with MFC too.

  8. Good Point says:

    On the Microsoft & Mac comment, apparently they use them for ideas also:

    In this case, it was a personally owned Mac, not a MS owned one.

  9. Richard says:

    Doesn’t bits of Outlook use MFC? The Calendar class (caption: Day View) is called AfxWndW.

  10. Mike Dimmick says:

    Microsoft Management Console was an MFC application, at least up to and including version 2.x. I don’t know about MMC 3.0.

    James Schend: actually I think those G5s ended up as Xbox 360 alpha devkits (as I recall, 2xG5 in some bizarre crossbar lashup made one devkit), which is why MS were annoyed when their existence was disclosed (MS not previously having announced that the Xbox 360 would have a PowerPC-based processor).

  11. Ben Bryant says:

    “an MFC or VB program” makes it sound like he confuses MFC with being a language rather than a bunch of C++ classes and Win32 wrapper. I don’t know why he said that stuff about not being sure the number of MFC programs in Microsoft is non-zero — I’ve never worked there but would be certain it was non-zero because it is such a normal option for C++ development to at least use CString in Visual Studio. I mean I know Raymond must know this so it is just an odd post.

    [I find it odd that you’re “certain” of this. It’s extremely likely but that’s not the same as certain. Who knows, maybe there’s some internal Microsoft string class that is “better than” CString which everybody uses instead? (I don’t know whether this is true or not. I don’t work in MFC.) -Raymond]
  12. J says:

    "I’ve never worked there but would be certain it was non-zero because it is such a normal option for C++ development to at least use CString in Visual Studio."

    Normal for who?  Why would I introduce a dependency on MFC just to be able to manipulate strings as a CString?  That sounds completely abnormal to me.

  13. ulric says:

    you must be baiting someone with this post :D

    Seriously, I think the reason people ask these questions is because conspiracy theorists say that microsoft is making us use tool they’d never use themselves because they aren’t any good.  MS does eat its own dog for a lot of things, but not everything.

    However, MFC not being widely used at Microsoft is true, and often repeated — often as a proof that MFC isn’t any good, even for MS.

    However that’s not what’s going on at all.  MFC does very little.  It can help you get a document/view app up and running quickly, but when you work on a huge application or operating system applets, there is nothing MFC really helps you with, writing that Window Proc isn’t where the problems as.  Also, the temporary objects are acceptable for small apps, but you wouldn’t want low-level controls to have this kind of overhead since the ease of writing code is not as important as performance.

    [It’s a “you can’t win” scenario. If Microsoft internally uses its own technology, then “Microsoft is totally NIH; if they didn’t invent it they won’t use it.” If Microsoft internally uses some other technology, then it’s “Microsoft’s own technology sucks so bad they have to use somebody else’s”. The original statement stands: Every project decides which technology is best for them. -Raymond]
  14. Stu says:

    I dont know about VB, but there are quite a number (33 in my search results) of VBScripts in a stock Vista install.

    With .Net programs, it is virtually impossible to tell which language they were written in without close examination of the CIL code.

  15. Jim says:


    Little oddity for the curious: MS actually ships some Perl code too – on the WinXP CDs. The code in question doesn’t do anything useful, though…

    And if you can get hold of a Windows NT Resource Kit, you’ll find a copy of ActiveState’s Perl on the CD. Wasn’t Perl one of the first OLE compatible scripting languages to be released for Win32?

    I’m fairly sure that most of the more recent Resource Kits (Win2k, Server2k3, XP) all had a few Perl scripts in, I definitely remember seeing Perl in one of the resource kits a couple months back.

    Personally as an old time Perl scripter, I find it a really easy way to run queries and so on against Active Directory.

  16. Dave says:

    They use what they want, coz they are many people indeed!

  17. James Schend says:

    I remember about a year back there was this big buzz in the blogging world that some Microsoft employee had been fired for taking photos of workers unloading boxes of new Apple G5 computers at one of the campus loading docks. The blog consensus was seemingly, "haha how embarrassing, Microsoft has to buy computers from Apple because their own OS is so bad!"

    Any rational person would think:

    1) DUH! Microsoft writes Office for Mac, Entourage, even Windows Media Player and Remote Desktop. How the hell are they supposed to write and test Macintosh applications without owning Macintoshes?

    2) Why would someone risk (and lose) their career by taking a photo they *know* is against company policy to document something that any rational intelligent person knows is happening?

    The whole thing was extremely dumb.

  18. Norman Diamond says:

    The Windows 95 version of Wordpad boldly announced its usage of MFC every time it started up, making one answer pretty obvious.  Also the Visual Studio 6 error lookup tool had an icon saying it was built on MFC.

    Microsoft provides a downloadable tool to check .inf files to help debug some kinds of errors.  The tool is coded in PERL.

    [But Wordpad and that INF checker aren’t internal tools, so your statements while perhaps true are irrelevant to the original question. -Raymond]
  19. Ben Bryant says:

    To me "internal use" just meant anyone at Microsoft used it to develop a Microsoft product (as opposed to developing MFC solely as something for Microsoft customers to use), but by saying "Wordpad and that INF checker aren’t internal tools" Raymond shows he meant it completely differently, that "external" refers to the use of the tool not to the use of MFC.

  20. James says:

    Mike: Actually, by reacting in this way MS were drawing attention to the situation; otherwise, MS unloading a crate of PowerMacs shouldn’t have been any more remarkable than unloading Dells or HPs: they develop Mac software, it would be strange for MS *not* to buy Apple systems!

    Little oddity for the curious: MS actually ships some Perl code too – on the WinXP CDs. The code in question doesn’t do anything useful, though…

  21. Xavi says:

    The answer to the question "Do they or not?" leads in case of a "Almost never for non trivial GUIs" to the much more important question "Why not?"

    When it comes to apps that are more than a 1000-liner, anyone using the MFC knows the reason why.

  22. Gabest says:

    Actually, CString and all the CAtl* collection classes can be used without MFC, just using code from the ATL header files.

  23. Andy says:

    Why are we discussing MFC?! Now, Richard Grimes and his "does MS use .NET to write Windows"  articles, surely they’re more relevant to the modern age.

  24. Axel says:

    Craig Ward figures that if he asks enough questions I might answer one of them.

    Seems he was right too. I could not tell whether there was annoyance in your sentence.

  25. required says:

    "Office seems using very custom window classes (not MFC ones)"

    One could tell that purely from the fact that it behaves so differently to anything else ;)

  26. Craig Ward says:

    I should’ve clarified the use of "internal" in my original question. I was actually trying to ascertain whether Microsoft actually used MFC, or even VB (and yes I do know that MFC is a Win32 wrapper and *not* a language), in building apps (such as Office) or even Windows "components".

    As ulric commented, I wanted to know whether a typical Microsoft dev team *always* valued performance (by writing low-level code) over the time saved by using a Win32 wrapper (to build the app).

    I totally understand that the best (ie: most appropriate) tool for the job wins out, as that’s what happens here where I work, and I guess (hope!) in most software houses.

  27. MrAsm says:

    Running "DEPENDS" tool on MSFT apps will tell you if they use MFC.


    It seems to me that Office does *not* use MFC (because I see no dependecies from MFC DLL).

    Moreover, investigating with Spy++, Office seems using very custom window classes (not MFC ones).

    Running DEPENDS with MSPAINT.EXE shows that Paint uses MFC.

    However, MFC seems to me a useful tool (IMHO), and I’m glad Microsoft gave us this tool.

  28. Loz says:

    The answer is very simple: many Microsoft tools are written with custom framework (the most notable example in Office, with a COM-based framework). They use ATL a lot, as you can see if you use Spy++. Uh, and Spy++ is written in MFC!

  29. Loz says:

    Xavi: "When it comes to apps that are more than a 1000-liner, anyone using the MFC knows the reason why.

    I’m actually actively developing an application in MFC, and it has more than 60000 lines of non-blank source code. It runs very very well and it’s also easy to maintain. Of course, no document/view there, but a lot of custom classes. I find programming in MFC very pleasant, it frees me about a lot of repeating little tasks. Hint: it helps a lot if you know very good the MFC internals… there’s the source code to read and study!

  30. Loz says:

    Andy: "does MS use .NET to write Windows"

    Early alphas of Longhorn were written in .NET (even the shell was rewritten in .NET)… it was slow and carried a lot of problems, so they rebased most of Longhorn on Windows Server 2003 SP1 and now Explorer.exe is still the son of the Explorer.exe of Windows 95: a mess of C, C++ and COM.

    The very first .NET application from Microsoft is OneCare, although only the front-end is .NET. If you play with Spy++ and other tools, you’ll find that OneCare is actually a mix of components written in .NET, ATL and even plain C or C++.

  31. Norman Diamond says:

    On the language tangent:  MSDN says that Rich Edit (Controls) version 1.0 was written in C but version 2.0 was written in C++.

    Tuesday, January 16, 2007 8:30 AM by Andy

    Now, Richard Grimes and his "does MS use .NET

    to write Windows" articles, surely they’re

    more relevant to the modern age.

    Then this isn’t the blog you want to read.  Look at the upper-right corner of each page, second line from the top.

  32. ih says:

    Visio has used MFC since version 2000 (for its UI layer).

    .NET is find and dandy for knocking up little solutions or cobbling together in-house systems, but if you’re building an industry-strength app that you plan to rely on for your company’s revenue, I think trying to base it on .NET would be suicide. Which is why MFC has persisted for so long – its not great, but its way better than writing to the Win32 APIs directly (for UI stuff)!

  33. time says:

    [But Wordpad and that INF checker aren’t internal tools, so your statements while perhaps true are irrelevant to the original question. -Raymond]

    Many tools start out as internal tools and later become public, often unsupported, tools.

  34. anonymous says:

    VB? As far as I can remember, Microsoft at least used VB for building the following programs:

    • Interactive Multimedia Programs, like Microsoft Interactive CD Sampler, Microsoft Multimedia Catalog, Windows 95 Tour, and probably some "Microsoft Home" and "Microsoft Kids"-branded programs.

    • Games: a few games from some old Windows Entertainment Packs were developed with VB (as described in their about boxes).

    • Some Windows Administration Utilities, notably the Windows 95 and 98 Batch Setup.

  35. Sameera says:

    MS used WTL, and lied to the world saying it didn’t exist. I asked a Microsofty about WTL at a teched where they were 1st introducing VS 2005. And he looked me straight in the eyes and said WTL was obsolete and no future version will come off it. 2 weeks later WTL 7.5 showed up on sourceforge!

    [Perhaps the person you talked to was misinformed. It’s a big company, after all. I don’t know what everybody’s plans are (not that they’d tell me anyway). -Raymond]
  36. Oz Solomon says:

    The Visual C++ 6 IDE (as well as version 5 and its cousins such as eVC) all used MFC.  I used that fact to hook into places where the sun don’t shine when I wrote WndTabs.

    There was talk a few years back about opening the source of the old IDE to the MSDN community.  Too bad that didn’t happen.  It was a pretty good example of things you can do with MFC.

  37. Feroze Daud says:

    Anyone who says Microsoft doesnt use .Net is smoking crap. Parts of exchange server are using .Net. Quite a few Line of business applications are also written with .net.

Comments are closed.

Skip to main content