BOOL GetItem( int nItem, TCITEM* pTabCtrlItem ) const; TCITEM tcItem; CString pszString; // Get text for the tab item. GetDlgItemText(IDC_ITEM_TEXT, pszString); // Get the current tab item text. TCHAR buffer[256] = {0}; tcItem.pszText = buffer; tcItem.cchTextMax = 256; tcItem.mask = TCIF_TEXT; m_TabCtrl.GetItem(0, &tcItem); TRACE(_T("Changing item text from %s to %s..."), tcItem.pszText, pszString); // Set the new text for the item. tcItem.pszText = pszString.LockBuffer(); // Set the item in the tab control. m_TabCtrl.SetItem(0, &tcItem); pszString.UnlockBuffer();
TCITEM tcItem;
CString pszString; // Get text for the tab item.
GetDlgItemText(IDC_ITEM_TEXT, pszString); // Get the current tab item text.
TCHAR buffer[256] = {0};
tcItem.pszText = buffer;
tcItem.cchTextMax = 256;
tcItem.mask = TCIF_TEXT;
m_TabCtrl.GetItem(0, &tcItem);
TRACE(_T("Changing item text from %s to %s..."), tcItem.pszText, pszString); // Set the new text for the item.
tcItem.pszText = pszString.LockBuffer(); // Set the item in the tab control.
m_TabCtrl.SetItem(0, &tcItem); pszString.UnlockBuffer();
tcItem.pszText就是标签名字
TC_ITEM tcitem;
m_tabal.GetItem(n,&tcitem); //n为索引值 第一个标签索引为0
tcitem.pszText为标签名。要得到所有的写个循环