就是图标不总显示在每一行的前面,可以的话,具体应该怎么做

解决方案 »

  1.   

    应该自己画吧,重载virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
      

  2.   

    void CMyListCtrl::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
    {
    CDC* pDC = CDC::FromHandle(lpDrawItemStruct->hDC);
    int iSavedDC = pDC->SaveDC();             // Save DC state
            
    int iItem = lpDrawItemStruct->itemID; CRect rcBound;
    GetItemRect(iItem, rcBound, LVIR_BOUNDS); LV_COLUMN lvc;
    lvc.mask = LVCF_FMT | LVCF_WIDTH;
    for(int nColumn = 0; GetColumn(nColumn, &lvc); nColumn++){
    //自己添把
    } pDC->RestoreDC(iSavedDC);                 // Restore DC.
    }