MFC, How do I change the capiton of TabCtrl

192 views Asked by At

I know the InsertItem is for add new tab in tabctrl, but I need change the caption of tab after create, I use keyword tabctrl and caption to search the old article ,but no relation problem to solve it, hot do I change the caption of tab page...

1

There are 1 answers

1
user1753112 On BEST ANSWER

OK,

I got the solution, as follow code

TC_ITEM TabCtrlItem;

switch(m_tabCtrl.GetCurSel())
{
case TAB1:
    TabCtrlItem.mask = TCIF_TEXT;
    TabCtrlItem.pszText = _T("Some Text");
    m_tabCtrl.SetItem(TAB1, &TabCtrlItem );