GetItemState()

item item state

CTreeCtrl::GetItemState();
原型:
UNIT GetItemState(HTREEITEM hItem,UINT nStateMask) CONST;
用途:
返回由hItem指定的項的狀態。
參數:
hItme——要 獲取其狀態的項的句柄。
返回值:
指定列表視圖項的狀態標誌。
說明:
獲取列表視圖項的狀態。 項的狀態被LVITEM結構的state成員所指定,如同在線上文檔“平台SDK”中所描述的。當指定或更改一個項的狀態後,stateMask成員指定希望更改的狀態位。
CListCtrl::GetItemState
UNIT GetItemState(int nItem,UNIT nMask) const
Value:
LVIS_CUTThe item is marked for a cut-and-paste operation.
LVIS_DROPHILITEDThe item is highlighted as a drag-and-drop target.
LVIS_FOCUSEDThe item has the focus, so it is surrounded by a standard focus rectangle. Although more than one item may be selected, only one item can have the focus.
LVIS_SELECTEDThe item is selected. The appearance of a selected item depends on whether it has the focus and also on the system colors used for selection.
LVIS_OVERLAYMASKUse this mask to retrieve the item's overlay image index.
LVIS_STATEIMAGEMASKUse this mask to retrieve the item's state image index.
 nStateMask——指示要獲取哪些狀態的掩碼。NStateMask的詳細說明可參見CTreeCtrl::GetItem中關於結構TV_ITEM的成員變數state和stateMask的討論。

相關詞條

熱門詞條

聯絡我們