CListCtrl::InsertItem int InsertItem( const LVITEM* pItem );int InsertItem( int nItem, LPCTSTR lpszItem );int InsertItem( int nItem, LPCTSTR lpszItem, int nImage );int InsertItem( UINT nMask, int nItem, LPCTSTR lpszItem, UINT nState, UINT nStateMask, int nImage, LPARAM lParam );Return ValueThe index of the new item if successful or -1 otherwise.
CListCtrl::SetCheck BOOL SetCheck( int nItem, BOOL fCheck = TRUE );Return ValueNonzero if the item is checked, otherwise 0.
int InsertItem( const LVITEM* pItem );int InsertItem( int nItem, LPCTSTR lpszItem );int InsertItem( int nItem, LPCTSTR lpszItem, int nImage );int InsertItem( UINT nMask, int nItem, LPCTSTR lpszItem, UINT nState, UINT nStateMask, int nImage, LPARAM lParam );Return ValueThe index of the new item if successful or -1 otherwise.
BOOL SetCheck( int nItem, BOOL fCheck = TRUE );Return ValueNonzero if the item is checked, otherwise 0.
m_list.SetExtendedStyle(LVS_EX_CHECKBOXES);即可