if (iItem == infoPtr->iSelected)
center_offset_v = ((drawRect->bottom - drawRect->top) - (rcText.bottom - rcText.top) - infoPtr->uVItemPadding) / 2;
else
center_offset_v = ((drawRect->bottom - drawRect->top) - (rcText.bottom - rcText.top) + infoPtr->uVItemPadding) / 2;
Wouldn't it be clearer as:
center_offset_v = (drawRect->bottom - drawRect->top) + (rcText.bottom - rcText.top); if (iItem == infoPtr->iSelected) center_offset_v -= infoPtr->uVItemPadding; else center_offset_v += infoPtr->uVItemPadding; center_offset_v /= 2;
That breaks up the long lines, and eliminates the common sub-expressions...
Mike