MFC Windows 95 Support

This article describes how MFC version 4.x supports programming for Windows 95.

The most important change is that MFC versions 4.0 and later fully supports programming for Microsoft Windows 95. Your MFC applications can run on either Windows 95 or Windows NT version 3.51 and later. Under each environment, your applications have the appropriate visual look.

Here are the key features for Windows 95:

  • New common control classes

  • New implementations for control bar and property sheet classes

  • Rich edit classes

  • Other new controls

  • New common dialogs

  • Ability to easily customize the File Open dialog box

For more information on these Windows 95 features, see Windows 95 Functionality.

New Common Control Classes

MFC supplies classes for new Win32 common controls, including the rich edit control. These controls are available under Windows 95 and Windows NT version 3.51 or later. They supplement Windows common controls such as list boxes, edit controls, and combo boxes. Most of the new control classes were released in beta quality with MFC version 3.1; version 4.0 supplies them in finished form and includes controls not released with version 3.1.

For more on using the common control classes, see Control Topics.

  •    A window that displays successive frames of an Audio Video Interleaved (AVI) clip during a lengthy operation.

  •    A resizable button that appears above a column of text, allowing the user to display more or less information in the column.

  •    A window that enables the user to create a hot key. A "hot key" is a key combination that the user can press to perform an action quickly.

  •    A collection of images used to efficiently manage large sets of icons or bitmaps.

  •    A window that displays a collection of items each consisting of an icon and a label.

  •    (Also known as a "progress bar control.") A window that an application can use to indicate the progress of a lengthy operation.

  •    A window in which the user can enter and edit text with character and paragraph formatting. The control can include embedded OLE objects. See Rich Edit Classes for related information.

  •    (Also known as a "trackbar.") A window containing a slider and optional tick marks that sends notification messages to indicate changes in its position.

  •     (Also known as an "up-down control.") A pair of arrow buttons that the user can click to increment or decrement a value, such as a scroll position or a number displayed in a companion control.

  •    A horizontal window in a parent window in which an application can display various kinds of status information. This control resembles the MFC class.

  •    Analogous to the dividers in a notebook or the labels in a file cabinet. By using a tab control, an application can define multiple pages for the same area of a window or dialog box. (See also MFC class .)

  •    A window that contains one or more command-generating buttons. This control resembles the MFC class.

  •    A small pop-up window that displays a single line of text describing the purpose of a toolbar button or other tool in an application.

  •    (Also known as a "tree view control.") A window that displays a hierarchical list of items, such as the headings in a document, the entries in an index, or the files and directories on a disk. Each item consists of a label and an optional bitmapped image, and each item can have a list of subitems associated with it.

New Implementations for Control Bar and Property Sheet Classes

The following MFC classes have been reimplemented using some of the new Windows common controls listed earlier in this article:

  •    Now uses the toolbar control represented by class . Class COldToolBar provides the previous implementation for backward compatibility so that you can continue to use your customizations from the previous versions of MFC. See the MFC sample .

  • Tool Tips   Now uses the tooltip control represented by class .

  •    Now uses the status bar control represented by class . Class COldStatusBar provides the previous implementation for backward compatibility so that you can continue to use your customizations from the previous version of MFC.

  • and    Now use the Win32 property sheet API.

In addition, enhancements to class , the base class for CToolBar, CStatusBar, and , let your users resize toolbars in the same way you can resize the toolbars in Visual C++ and many other Microsoft applications.

Rich Edit Classes

In addition to , a class that encapsulates the rich edit text control, MFC supplies related classes to complement the control and enhance its use for building text editors. These new classes are listed below. The new classes integrate a rich edit control with the MFC document/view architecture.

  •    Maintains a list of OLE client items and works with a CRichEditView.

  •    Maintains the text and its formatting characteristics and works with a CRichEditDoc.

  •    Provides container-side access to the OLE client items stored in a CRichEditDoc.

Other New Controls

Other new MFC classes provide specialized list box controls:

  •    A list box control in which you can drag items to produce orderings other than alphabetical.

  •    A list box control in which the strings are preceded by check boxes. For an example, see the dialog box that opens when you choose Custom on the Installation Options dialog box in Visual C++ Setup.

New Common Dialogs

There are several new classes for common dialog boxes. OLE dialog boxes now use the OLEDLG.DLL file supplied by the system. All common dialog classes are now derived from .

  •    Encapsulates the services provided by the Windows common OLE Page Setup dialog box with additional support for setting and modifying print margins. This class is designed to take the place of the Print Setup dialog box.

  •    Encapsulates the Windows common OLE Object Properties dialog box. Common OLE Object Properties dialog boxes provide an easy way to display and modify the properties of an OLE document item in a manner consistent with Windows standards.

Ability to Easily Customize the File Open Dialog Box

Class includes new member functions for customizing the File Open dialog box. For example, you can add your own controls to the dialog box.

See Also   Changes from MFC Versions 2.0 and 2.5, Changes from MFC Version 2.0 32-Bit Edition, Features No Longer Available in MFC