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