The Message Map - Mgr

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.

MFC View Classes

Class NameDescription
CViewRoot class for all view classes
CCtrlViewBase class for CEditView, CRichEditView, CListView, and CTreeView; can be used to create view classes based on other types of controls
CEditViewWraps the multiline edit control and adds print, search, and search-and-replace capabilities
CRichEditViewWraps the rich edit control
CListViewWraps the list view control
CTreeViewWraps the tree view control
CHtmlViewCreates views from HTML files and other media supported by the Microsoft Internet Explorer WebBrowser control
CScrollViewAdds scrolling capabilities to CView; base class for
CFormViewImplements scrollable “form” views created from dialog templates
CRecordViewCFormView derivative designed to display records obtained from an ODBC database
CDaoRecordViewDAO version of CRecordView
COleDBRecordViewOLE DB version of CRecordView

CTreeView

Take OnTvnSelchanged as an example.

class wizard

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

Before double-clicking;

After double-clicking.

Ref