MFC Class Hierarchy
This document outlines the class hierarchy for the Microsoft Foundation Class (MFC) Library, a powerful C++ framework for developing Windows applications.
CObject
CFileCString- Collections
CMap,CPlex,CMapPtrToPtr,CMapPtrToWord,CMapWordToPtr,CMapWordToWord,CMapStringToOb,CMapStringToPtr,CMapStringToString CViewCScrollViewCTreeViewCRichEditViewCListViewCRecordViewCWindowCFrameWndCDialogCControlBarCWinAppCDocumentCPropertyPageCPropertySheet
CFile
Represents a file object. Used for file operations like reading, writing, and seeking.
CString
Manages strings, providing features for manipulation and formatting, similar to C++ std::string but with MFC-specific methods.
Collections
MFC provides several template classes for managing collections of objects:
CArray
A dynamic array (vector-like) of any type of object derived from CObject or primitive types.
CPtrArray
A dynamic array of generic pointers (void*).
CObArray
A dynamic array of pointers to CObject derived classes. This is a specialized version of CArray.
CList
A doubly linked list of any type of object derived from CObject or primitive types.
CPtrList
A doubly linked list of generic pointers (void*).
CObList
A doubly linked list of pointers to CObject derived classes. This is a specialized version of CList.
CMap
A template class for maps (key-value pairs) where the key and value can be of various types.
CPlex
An internal helper class used by CList and CArray for memory management.
CMapStringToOb
A map where keys are CString objects and values are pointers to CObject derived classes.
CView
An abstract base class for view classes. Views are responsible for displaying data stored in a document and handling user input related to that data.
CScrollView
A CView that supports scrolling. Provides functionality for managing scroll bars and viewport.
CFormView
A CScrollView that displays a dialog template resource. Useful for creating forms.
CDialogView
A CView that displays a dialog template resource. Similar to CFormView but can be used more flexibly within MDI applications.
CTreeView
A CView that displays data in a tree control (CTreeCtrl).
CRichEditView
A CView that supports rich text editing using the Rich Edit control.
CListView
A CView that displays data in a list control (CListCtrl).
CRecordView
A CView that displays data from a database recordset. Designed for database applications.
CWindow Hierarchy (CWnd and descendants)
This branch represents all window-based classes in MFC, from the fundamental CWnd to various control and frame window types.
CFrameWnd
Represents a top-level window with a frame, menu, and client area. Often the main window of an application.
CMDIFrameWnd
A CFrameWnd that supports the Multiple Document Interface (MDI), allowing multiple child windows within a single parent frame.
CMDIChildWnd
Represents a child window within an MDI frame window.
CDialog
Base class for dialog box windows. Manages interaction with dialog template resources.
CDialogEx
An enhanced version of CDialog, offering additional features like DPI awareness and automatic sizing.
CControlBar
An abstract base class for control bars, such as toolbars and status bars.
CToolbar
Implements a toolbar with buttons and other controls.
CStatusBar
Implements a status bar, often used to display messages and pane information.
CRebarBar
Implements a rebar control, a container for other controls that can be banded and rearranged.
CWnd
The base class for all window classes in MFC. Provides fundamental window message handling and management.
CStatic
Represents a static control, typically used for labels or fixed text.
CEdit
Represents an edit control for single-line or multi-line text input.
CButton
Represents a button control, including standard buttons, check boxes, and radio buttons.
CListBox
Represents a list box control for selecting one or more items from a list.
CComboBox
Represents a combo box control, combining an edit box with a list box.
CComboBoxEx
An enhanced combo box that can display icons and item data.
CComboBoxButton
A button that can be associated with a combo box to trigger its drop-down list.
CSplitterWnd
Creates a splitter window, dividing the client area into multiple panes, each capable of hosting a view.
CTabCtrl
Represents a tab control, allowing multiple dialogs or views to be presented on separate tabs.
CWinApp
The base class for MFC application objects. There is typically one CWinApp object in an MFC application, responsible for initializing the application and message loop.
CDocument
The base class for document objects. Documents store the application's data and manage its state. They work in conjunction with CView objects.
CPropertyPage
Represents a single page within a property sheet (tabbed dialog).
CPropertySheet
Represents a property sheet (tabbed dialog) that can contain multiple CPropertyPage objects.