共用方式為


CTabCtrl::DeleteItem

從的索引標籤控制項中移除指定的項目。

BOOL DeleteItem(
  int nItem 
);

參數

  • nItem
    要刪除之項目的以零起始的值。

傳回值

如果不是零,則成功,則為 0。

範例

// This example assumes that there is a CTabCtrl member of the
// CTabDlg class named m_TabCtrl.  On a button handler
// called OnDeleteItem of the dialog box the tab control will
// delete the 0 indexed item.

void CTabDlg::OnDeleteItem()
{
   // Delete the first item in the tab control.
   m_TabCtrl.DeleteItem(0);   
}

需求

Header: afxcmn.h

請參閱

參考

CTabCtrl 類別

階層架構圖

CTabCtrl::DeleteAllItems