创建ListCtrl时参数nSubItem到底怎么用?
int InsertColumn(
   int nCol,
   LPCTSTR lpszColumnHeading,
   int nFormat = LVCFMT_LEFT,
   int nWidth = -1,
   int nSubItem = -1 
);一直以来都采用默认值-1,改为其他值也没见什么变化,奇怪???

解决方案 »

  1.   

    SetItemText(item, nSubItem, pszText...);
      

  2.   

    将某subitem分配到这个列
    nSubItem从0开始,是一行中各列的index
      

  3.   

    to: alfwolf(戈壁孤狼) “将某subitem分配到这个列”是什么意思?会产生什么效果?还有,请问怎么获取当前选中项的子项(即列号)?
      

  4.   

    subitem是在listctrl为report风格时使用的.
      

  5.   

    to:_foo(void)我就是在report风格时使用的(别的风格nSubItem无效),SetItemText(item, nSubItem, pszText...);也用了,一切正常:)俺就是想深入了解一下nSubItem的作用,还忘各位大侠不吝指教。
      

  6.   

    Index of the subitem associated with the column. If this parameter is -1, no subitem is associatied with the column.
      

  7.   

    谢谢各位,我知道了,^_^,原来这么简单:)那么怎么在LVN_ITEMCHANGED消息中获取当前点中的nSubItem?
      

  8.   

    有如下例子
             m_list.InsertColumn(0,"name");
    m_list.InsertColumn(1,"age");
        m_list.Insert(0,"sex");
            我的本意是把第一列的列头改为 “sex", 可是他却将“sex”直接插入了列表中,
    其他的列却向后移动了。如何解决。