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:
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.
- CAnimateCtrl A window that displays successive frames of an Audio Video Interleaved (AVI) clip during a lengthy operation.
- CHeaderCtrl A resizable button that appears above a column of text, allowing the user to display more or less information in the column.
- CHotKeyCtrl 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.
- CImageList A collection of images used to efficiently manage large sets of icons or bitmaps.
- CListCtrl A window that displays a collection of items each consisting of an icon and a label.
- CProgressCtrl (Also known as a "progress bar control.") A window that an application can use to indicate the progress of a lengthy operation.
- CRichEditCtrl 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.
- CSliderCtrl (Also known as a "trackbar.") A window containing a slider and optional tick marks that sends notification messages to indicate changes in its position.
- CSpinButtonCtrl (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.
- CStatusBarCtrl A horizontal window in a parent window in which an application can display various kinds of status information. This control resembles the MFC CStatusBar class.
- CTabCtrl 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 CPropertySheet.)
- CToolBarCtrl A window that contains one or more command-generating buttons. This control resembles the MFC CToolBar class.
- CToolTipCtrl 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.
- CTreeCtrl (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:
- CToolBar Now uses the toolbar control represented by class CToolBarCtrl. 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 DOCKTOOL.
- Tool Tips Now uses the tooltip control represented by class CToolTipCtrl.
- CStatusBar Now uses the status bar control represented by class CStatusBarCtrl. Class COldStatusBar provides the previous implementation for backward compatibility so that you can continue to use your customizations from the previous version of MFC.
- CPropertySheet and CPropertyPage Now use the Win32 property sheet API.
In addition, enhancements to class CControlBar, the base class for CToolBar, CStatusBar, and CDialogBar, 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 CRichEditCtrl, 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.
- CRichEditDoc Maintains a list of OLE client items and works with a CRichEditView.
- CRichEditView Maintains the text and its formatting characteristics and works with a CRichEditDoc.
- CRichEditCntrItem 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:
- CDragListBox A list box control in which you can drag items to produce orderings other than alphabetical.
- CCheckListBox 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 CCommonDialog.
- CPageSetupDialog 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.
- COlePropertiesDialog 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 CFileDialog 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