How to subclass the CTreeCtrl in a CTreeView?
Leor Amikam -- amikam@mindspring.com Friday, December 13, 1996 Environment: Win95, VC42b I am using a CTreeView-derived class. Is there any way to subclass the Tree Control part of the view to another CTreeCtrl-derived class similiar to doing a SubclassDlgItem in a dialog? Leor Amikam
Mike Marshall -- marshall@milner.com Monday, December 16, 1996 In your OnCreate, or possibly your OnInitialUpdate, get a reference to you tree control and then use SubclassWindow, as follows CTreeCtrl& treeCtrl = GetTreeCtrl(); // where m_pMySubclasser is the window whose // message map you want to attach to the // tree control. m_pMySubclasser->SubclassWindow(treeCtrl.m_hWnd); You can call UnsubclassWindow to eliminate the relationship as well. ---------- From: Leor Amikam[SMTP:amikam@mindspring.com] Sent: Friday, December 13, 1996 10:21 AM To: mfc-l@netcom.com Subject: How to subclass the CTreeCtrl in a CTreeView? Environment: Win95, VC42b I am using a CTreeView-derived class. Is there any way to subclass the Tree Control part of the view to another CTreeCtrl-derived class similiar to doing a SubclassDlgItem in a dialog? Leor Amikam
| Вернуться в корень Архива |