git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46382
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
-static bool HandleSubItemPrepaint(LPNMLVCUSTOMDRAW pLVCD, HFONT hfont)
+static
+bool HandleSubItemPrepaint(LPNMLVCUSTOMDRAW pLVCD, HFONT hfont, int colCount)
{
NMCUSTOMDRAW& nmcd = pLVCD->nmcd;
{
NMCUSTOMDRAW& nmcd = pLVCD->nmcd;
// get the rectangle to paint
RECT rc;
ListView_GetSubItemRect(hwndList, item, col, LVIR_BOUNDS, &rc);
// get the rectangle to paint
RECT rc;
ListView_GetSubItemRect(hwndList, item, col, LVIR_BOUNDS, &rc);
+ if ( !col && colCount > 1 )
{
// broken ListView_GetSubItemRect() returns the entire item rect for
// 0th subitem while we really need just the part for this column
{
// broken ListView_GetSubItemRect() returns the entire item rect for
// 0th subitem while we really need just the part for this column
for ( int col = 0; col < colCount; col++ )
{
pLVCD->iSubItem = col;
for ( int col = 0; col < colCount; col++ )
{
pLVCD->iSubItem = col;
- HandleSubItemPrepaint(pLVCD, hfont);
+ HandleSubItemPrepaint(pLVCD, hfont, colCount);
}
HandleItemPostpaint(nmcd);
}
HandleItemPostpaint(nmcd);