Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CTabCtrl in MDI splitter won't compile

CTabCtrl in MDI splitter won't compile

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vaclav
    wrote on last edited by
    #1

    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

    V 1 Reply Last reply
    0
    • V 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

      V Offline
      V Offline
      Vaclav
      wrote on last edited by
      #2

      I think I found it. The CTabCtrl is not CView derived. Vaclav

      R 1 Reply Last reply
      0
      • V Vaclav

        I think I found it. The CTabCtrl is not CView derived. Vaclav

        R Offline
        R Offline
        Ryan Binns
        wrote on last edited by
        #3

        Vaclav wrote:

        I think I found it. The CTabCtrl is not CView derived.

        Correct. You'll have to use a CFormView with a CTabCtrl 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"

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups