Kyoshiro
asked on
Enquery about Tab Control
hi, i'm a newbie to visual c++ and needs some expert guidance :)
i am adding controls to a dialog using control toolbars, but when i try to use drag and put the Tab Control onto my dialog, i discover that it actually gave me 5 tabs and i can't find way to change that.
i would like to
1) Change the number of tab to 3 instead of 5
2) Instead of tag being name "Tag 1", "Tag 2", "Tag 3", how can i set the name to like eg. "Graphs", "Forms", "Values"?
Any help would be greatly appreciate. Thanks.
i am adding controls to a dialog using control toolbars, but when i try to use drag and put the Tab Control onto my dialog, i discover that it actually gave me 5 tabs and i can't find way to change that.
i would like to
1) Change the number of tab to 3 instead of 5
2) Instead of tag being name "Tag 1", "Tag 2", "Tag 3", how can i set the name to like eg. "Graphs", "Forms", "Values"?
Any help would be greatly appreciate. Thanks.
ASKER
Ic. Thanks Alex, i now get the idea of the Tag control having to be program. But i still don't get what you meant by
1) "Add class member fot this tab control (for example, m_tab_ctrl)"
2) "add the following lines to OnIntiDialog:
m_tab_ctrl.InsertItem(0, "Item 0");
m_tab_ctrl.InsertItem(1, "Item 1");"
erm, can you explain more on 1)?
About 2), do you mean adding both those lines in the
e.g.
/* BOOL CFYPDlg::OnInitDialog()
{
CDialog::OnInitDialog();
*/ ?
Thanks again.
1) "Add class member fot this tab control (for example, m_tab_ctrl)"
2) "add the following lines to OnIntiDialog:
m_tab_ctrl.InsertItem(0, "Item 0");
m_tab_ctrl.InsertItem(1, "Item 1");"
erm, can you explain more on 1)?
About 2), do you mean adding both those lines in the
e.g.
/* BOOL CFYPDlg::OnInitDialog()
{
CDialog::OnInitDialog();
*/ ?
Thanks again.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes~. Thanks pal. Thanks for the help :)
m_tab_ctrl.InsertItem(0, "Item 0");
m_tab_ctrl.InsertItem(1, "Item 1");
Now the control has 2 tabs.