I've created a Doc/View architecture application using MFC. I have a number of view class types derived from a parent view class, which itself is derived from CView. During the program execution I get the currently active view using line 1 below. I want to then call a function on that view, but at the child class level not the parent, or CView, level. Is there a way to do that without repeating lines 3-5 below for each class?
CView* testview = ((CFrameWnd*) AfxGetApp()->m_pMainWnd))->GetActiveView();