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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Create view in a CTabCtrl

Create view in a CTabCtrl

Scheduled Pinned Locked Moved C / C++ / MFC
csharphelp
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.
  • D Offline
    D Offline
    DrZOO
    wrote on last edited by
    #1

    I have created a CTabCtrl in a CView and would like to insert a CScrollView into it. I don't quite get it; should I use CWnd::Create or CWnd::CreateEx (I don't think I really need the dwExStyle). I've tried both but it doesn't seem to work (probably just me being stupid and handling wrong variables). Thank's for all your help /DrZOO :confused: (using VC.NET) Chics are for fags!

    R 1 Reply Last reply
    0
    • D DrZOO

      I have created a CTabCtrl in a CView and would like to insert a CScrollView into it. I don't quite get it; should I use CWnd::Create or CWnd::CreateEx (I don't think I really need the dwExStyle). I've tried both but it doesn't seem to work (probably just me being stupid and handling wrong variables). Thank's for all your help /DrZOO :confused: (using VC.NET) Chics are for fags!

      R Offline
      R Offline
      rbc
      wrote on last edited by
      #2

      Hi DrZOO, I am try to create a CtabCtrl in a CView. Could you tell how you did it? Thanks

      D 1 Reply Last reply
      0
      • R rbc

        Hi DrZOO, I am try to create a CtabCtrl in a CView. Could you tell how you did it? Thanks

        D Offline
        D Offline
        DrZOO
        wrote on last edited by
        #3

        Hello rbc This is how my code for creating a CTabCtrl in a CView CRect rcClient(......); m_TabWeek.Create(TCS_FIXEDWIDTH | WS_CHILD | WS_VISIBLE, rcClient, this, 0x1006); m_TabWeek.SetItemSize(CSize(45, 23)); csTabtext = ctWeek.Format("%W"); // If the label is "static" you only need to set pszText LPTSTR lpszTabtext = new TCHAR[csTabtext.GetLength()+1]; _tcscpy(lpszTabtext, csTabtext); TabItem.pszText = lpszTabtext; if(m_TabWeek.InsertItem(index, &TabItem) == -1) { AfxMessageBox("Unable to create week tab"); return false; } You're welcome! /DrZOO Chics are for fags!

        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