Tree view message events
2025-12-09
Written by: xiaobin
Previously, we used manually added message maps; now we’ll use VC’s GUI to manage them.
This is mostly applied to controls that are not draggable. For example: MFC View Classes.
| Class Name | Description |
|---|---|
| CView | Root class for all view classes |
| CCtrlView | Base class for CEditView, CRichEditView, CListView, and CTreeView; can be used to create view classes based on other types of controls |
| CEditView | Wraps the multiline edit control and adds print, search, and search-and-replace capabilities |
| CRichEditView | Wraps the rich edit control |
| CListView | Wraps the list view control |
| CTreeView | Wraps the tree view control |
| CHtmlView | Creates views from HTML files and other media supported by the Microsoft Internet Explorer WebBrowser control |
| CScrollView | Adds scrolling capabilities to CView; base class for |
| CFormView | Implements scrollable “form” views created from dialog templates |
| CRecordView | CFormView derivative designed to display records obtained from an ODBC database |
| CDaoRecordView | DAO version of CRecordView |
| COleDBRecordView | OLE DB version of CRecordView |
Take OnTvnSelchanged as an example.

Switch to the “Messages” tab; double-click the selected event.

