- wxGetListCtrlSubItemRect(hwndList, item, subitem, LVIR_BOUNDS, rc);
- rc.left += 6;
+ wxGetListCtrlSubItemRect(hwndList, item, col, LVIR_BOUNDS, rc);
+ if ( !col && colCount > 1 )
+ {
+ // ListView_GetSubItemRect() returns the entire item rect for 0th
+ // subitem while we really need just the part for this column
+ RECT rc2;
+ wxGetListCtrlSubItemRect(hwndList, item, 1, LVIR_BOUNDS, rc2);
+ rc.right = rc2.left;
+ rc.left += 4;
+ }
+ else // not first subitem
+ {
+ rc.left += 6;
+ }