|| | |||Browse by category|
I'm using CGXTabWnd and embedding classes derived from CListView. I'm having trouble getting the scroll bars right. I've overridden GetScrollBarCtrl() in my view class and return a pointer to the tab window's scroll bar.
The problem is that all CCtrlView derivatives (like CListView) don't let you override GetScrollBarCtrl(). GetScrollBarCtrl() is simply never called from within MFC because all the controls must have their own scrollbars and therefore you cannot share these scrollbars with the tab window.
The only solution here is to turn off the tab window scrollbars in OnActivateView().
|void CGXEditView::OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView)
|CGXTabWnd* pTabWnd = GetParentTabWnd(this, TRUE);
if (pTabWnd != NULL)
|CEditView::OnActivateView(bActivate, pActivateView, pDeactiveView);|