CTabCtrl in MDI splitter won't compile
-
This code in splitter won't compile. The left pane is CTreeCtrl derived class and the right pane is CTabCtrl derived. if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CX_TreeView), CSize(100, 100), pContext) || !m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CX_TabView), CSize(100, 100), pContext) ) Here is the compiler (VC 6.0) output: X_SplitFrame.cpp Including X_TabView.h : header file F:\Dev\0 Image\V1\Image Project\X_SplitFrame.cpp(57) : error C2039: 'classCX_TabView' : is not a member of 'CX_TabView' f:\dev\0 image\v1\image project\x_tabview.h(13) : see declaration of 'CX_TabView' F:\Dev\0 Image\V1\Image Project\X_SplitFrame.cpp(57) : error C2065: 'classCX_TabView' : undeclared identifier I build both classes using MFC New class and I used #pragma message to make sure the header is included. What did I missed? Thanks for reading. Vaclav
-
This code in splitter won't compile. The left pane is CTreeCtrl derived class and the right pane is CTabCtrl derived. if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CX_TreeView), CSize(100, 100), pContext) || !m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CX_TabView), CSize(100, 100), pContext) ) Here is the compiler (VC 6.0) output: X_SplitFrame.cpp Including X_TabView.h : header file F:\Dev\0 Image\V1\Image Project\X_SplitFrame.cpp(57) : error C2039: 'classCX_TabView' : is not a member of 'CX_TabView' f:\dev\0 image\v1\image project\x_tabview.h(13) : see declaration of 'CX_TabView' F:\Dev\0 Image\V1\Image Project\X_SplitFrame.cpp(57) : error C2065: 'classCX_TabView' : undeclared identifier I build both classes using MFC New class and I used #pragma message to make sure the header is included. What did I missed? Thanks for reading. Vaclav
-
Vaclav wrote:
I think I found it. The CTabCtrl is not CView derived.
Correct. You'll have to use a
CFormView
with aCTabCtrl
inside it.Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"