CListCtrl::GetHotItem

目前擷取的清單檢視項目游標下方。

int GetHotItem( );

傳回值

清單檢視控制項的目前作用中項目的索引。

備註

此成員函式實作 Win32 巨集, ListView_GetHotItem的行為 Windows SDK,如中所述。 作用中的項目被定義為目前已選取的項目,當熱追蹤 (與產生選取) 時啟用。

熱追蹤啟用,,當使用者將滑鼠指標停留在清單檢視項目時,項目標籤會自動反白顯示,而不需要使用滑鼠按鈕。

範例

    // Set the hot item to the first item only if no other item is 
    // highlighted.
    if (m_myListCtrl.GetHotItem() == -1)
        m_myListCtrl.SetHotItem(0);

需求

Header: afxcmn.h

請參閱

參考

類別 CListCtrl

階層架構圖

CListCtrl::GetHotCursor