AboutBlogContact
SoftwareFebruary 22, 1993 2 min read 22

Visual C++ 1.0: MFC and the Rise of the Microsoft Framework

AunimedaAunimeda
📋 Table of Contents

Visual C++ 1.0: MFC and the Rise of the Microsoft Framework

It’s early 1993, and if you’ve been writing Windows apps in C using the standard SDK, you know the pain. Thousands of lines of boilerplate code just to get a window to show up and handle a few messages. But Microsoft’s new Visual C++ 1.0 is promising to change that with MFC 2.0.

The Document/View Architecture

MFC (Microsoft Foundation Classes) isn't just a wrapper around the Windows API; it’s a full application framework. The "Document/View" architecture is the big sell here. It encourages you to separate your data (the Document) from how it’s displayed (the View).

// A taste of the MFC world
class CMyDoc : public CDocument {
    // Data handling here
};

class CMyView : public CView {
    void OnDraw(CDC* pDC) {
        pDC->TextOut(10, 10, "Hello from MFC!");
    }
};

It’s a bit heavy-handed, and the macros (like DECLARE_DYNAMIC and BEGIN_MESSAGE_MAP) are everywhere, but it certainly beats writing giant switch statements for WndProc.

AppWizard and ClassWizard

The "Visual" part of the name comes from the new tools. "AppWizard" will generate a whole skeletal application for you in seconds. "ClassWizard" helps you hook up Windows messages to C++ member functions without digging through header files. It feels a bit like cheating, but when you have a deadline, it’s a lifesaver.

The Battle for the Desktop

We’re seeing a real war between Borland and Microsoft right now. Borland’s OWL (Object Windows Library) is arguably more elegant, but Microsoft has the advantage of owning the OS. I suspect we’ll be seeing a lot of MFC code in the years to come, for better or worse. I've just finished porting our internal telemetry tool to it, and while the executable size has grown, the code is much easier to navigate.

Read Also

Windows 7: Making Us Forget the Vista Nightmareaunimeda
Software

Windows 7: Making Us Forget the Vista Nightmare

Windows 7 is finally here, and it's everything Vista should have been. It's fast, it's stable, and the taskbar is actually useful.

The Millennium Bug (Y2K): The World's Biggest Refactoraunimeda
Software

The Millennium Bug (Y2K): The World's Biggest Refactor

As the clock ticks toward midnight on December 31st, 1999, the tech world is in a collective panic. Is the 'Y2K bug' a real threat, or just the result of decades of lazy coding?

Flash 4: The Introduction of ActionScript (and Logic)aunimeda
Software

Flash 4: The Introduction of ActionScript (and Logic)

Flash isn't just for spinning logos anymore. With version 4, Macromedia has introduced 'ActionScript,' giving us variables, loops, and the ability to build real web applications.

Need IT development for your business?

We build websites, mobile apps and AI solutions. Free consultation.

Get Consultation All articles