The approach described here, only works in some cases. The articles listed below describe a more general approach (namely, putting a control in a CView-derived class, and handling OnSize events.)
"How to Create a Custom View to Wrap Your Own Control"
Charles Calvert, January 30, 2000
MSDN Magazine Nov. 2001, C++ Q&A, "Understanding CControlView, [...]"
I failed to use the same method with two rich edit controls in SDI splitter windows. All I got is transparent windows which I can write nothing in. It seems like the CCtrlView constructor can not create rich edit control correctly.
Very good article, but let's say you've got your own CTreeCtrl dervied class which handles all your extra functionality How do you use that instead of the standard CTreeCtrl in your CTreeView derived class?
Do you simply cast to your own derived control class instead?