16,472
社区成员
发帖
与我相关
我的任务
分享
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();