do you know c++ class ? ;) class CYOUView : public CView { int m_int; }; If you try compile that string: ... GetActiveView()->m_int ... you got error "m_int not member of class CView" but if you write: ... ((CYOUView*)GetActiveView())->m_int ... that will compile, and work whith no error's ;)