user1753112
user1753112

Reputation: 203

MFC, How do I change the capiton of TabCtrl

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...

Upvotes: 0

Views: 196

Answers (1)

user1753112
user1753112

Reputation: 203

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 );

Upvotes: 3

Related Questions