哪位朋友做过XP下ListCtrl添加组的程序,我都快晕了.

解决方案 »

  1.   

    InsertGroup?http://218.108.41.12/vchome/book/listctrl.htm
      

  2.   

    看MSDN了.
    CString strGroup; LVGROUP msw_grp; 
    msw_grp.uAlign = 0; 
    msw_grp.mask = LVGF_GROUPID | LVGF_HEADER | LVGF_STATE ; 
    msw_grp.state = LVGS_NORMAL; 
    msw_grp.stateMask = LVGS_NORMAL;  msw_grp.iGroupId = 0; 
    wchar_t buffer[1024]; 
    wcsset(buffer,0);
    strGroup.Format("Group %d", 1);
    MultiByteToWideChar(0, 0, (char*)(LPCTSTR)strGroup, strGroup.GetLength(), buffer, 1024); 
    msw_grp.pszHeader = buffer; 
    msw_grp.cchHeader = wcslen(buffer); 
    msw_grp.cbSize = sizeof(LVGROUP);  m_list.InsertGroup(0, &msw_grp);
    m_list.EnableGroupView(true);
    执行这些代码需要哪些库的支持?在我新建的测试工程中没问题,但在需要用的工程中确说LVGROUP没有定义,Commctrl.h我加上了呀