如题,是不是使用Insert ActiveX Control导入 Microsoft ListView Control呢。但我看了导入文件的一些方法,没找到添加项的方法啊。

解决方案 »

  1.   

    直接用ListCtrl控件或继承ListView如果是视图
      

  2.   

    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.
      

  3.   

    CListCtrl::SetCheck
    BOOL SetCheck( int nItem, BOOL fCheck = TRUE );Return ValueNonzero if the item is checked, otherwise 0.
      

  4.   

    我知道了
    m_list.SetExtendedStyle(LVS_EX_CHECKBOXES);即可