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. TabControl In MFC

TabControl In MFC

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
5 Posts 4 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.
  • 0 Offline
    0 Offline
    002comp
    wrote on last edited by
    #1

    Hello Friends I am using tabcontrol first time in MFC.So,I have some question for this. 1.)I am creating a dilog in which at a time I have to show four tabs but maximum number of tabs are more than 200. As I saw that one tabCtrl showing only five tabs. How can i Achieve this? 2.)On one tab ,i have to show seven buttons whose color will change on tab.So,fo that Do i need to create a dilaog with seven button and then add it into tab? But how Do i this for all tabs? Thanks In Advance. Regards Yogesh

    C 1 Reply Last reply
    0
    • 0 002comp

      Hello Friends I am using tabcontrol first time in MFC.So,I have some question for this. 1.)I am creating a dilog in which at a time I have to show four tabs but maximum number of tabs are more than 200. As I saw that one tabCtrl showing only five tabs. How can i Achieve this? 2.)On one tab ,i have to show seven buttons whose color will change on tab.So,fo that Do i need to create a dilaog with seven button and then add it into tab? But how Do i this for all tabs? Thanks In Advance. Regards Yogesh

      C Offline
      C Offline
      Chandrasekharan P
      wrote on last edited by
      #2

      200 Tabs?? You should look into this google [^]and get an insight of what Tab control is and how to create tab controls. The links give you lots of links to other websites. It is worth looking into some of them

      Every new day is another chance to change your life.

      0 1 Reply Last reply
      0
      • C Chandrasekharan P

        200 Tabs?? You should look into this google [^]and get an insight of what Tab control is and how to create tab controls. The links give you lots of links to other websites. It is worth looking into some of them

        Every new day is another chance to change your life.

        0 Offline
        0 Offline
        002comp
        wrote on last edited by
        #3

        Thanks For Reply. i read all stuff related to Tab. I came across to a problem.I am creating a tab on which I want to insert a dialog which is having seven buttons. But when I use m_ctlTab.inserItem for Dilaog in OnInitDialog(), it is crashing. Do we need to set anything else to initialize tab? Regards Yogesh

        L J 2 Replies Last reply
        0
        • 0 002comp

          Thanks For Reply. i read all stuff related to Tab. I came across to a problem.I am creating a tab on which I want to insert a dialog which is having seven buttons. But when I use m_ctlTab.inserItem for Dilaog in OnInitDialog(), it is crashing. Do we need to set anything else to initialize tab? Regards Yogesh

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          yogeshs wrote:

          But when I use
          m_ctlTab.inserItem for Dilaog in OnInitDialog(), it is crashing.

          You need to use your debugger to find out exactly what is happening to cause the crash.

          Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness

          1 Reply Last reply
          0
          • 0 002comp

            Thanks For Reply. i read all stuff related to Tab. I came across to a problem.I am creating a tab on which I want to insert a dialog which is having seven buttons. But when I use m_ctlTab.inserItem for Dilaog in OnInitDialog(), it is crashing. Do we need to set anything else to initialize tab? Regards Yogesh

            J Offline
            J Offline
            JohnCz
            wrote on last edited by
            #5

            Are you sure is crashing or just asserting? Most likely it is the latter and it looks something like this: ASSERT(IsWindow(hwnd)); With limited info you gave in your post, I can only guess that tab object was not created (windows is not attached to the MFC object). You have to either call Create or subclass the tab control. I would strongly suggest two things: Reconsider 200 tabs; it seems a little too many to handle by the user (not to mention control). Consider using property sheet (CPropertySheet) and property pages (CPropertyPage). Property pages behave like dialogs.

            JohnCz

            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