- RECT rcSelection;
- RECT rcSeparator;
- RECT rcGutter;
- RECT rcText;
-
- SetRect(&rcSelection,
- rect.left + data->ItemMargin.left,
- rect.top + data->ItemMargin.top,
- rect.right - data->ItemMargin.right,
- rect.bottom - data->ItemMargin.bottom);
-
- SetRect(&rcSeparator,
- rcSelection.left + data->SeparatorMargin.left,
- rcSelection.top + data->SeparatorMargin.top,
- rcSelection.right - data->SeparatorMargin.right,
- rcSelection.bottom - data->SeparatorMargin.bottom);
-
- CopyRect(&rcGutter, &rcSelection);
- rcGutter.right = data->ItemMargin.left
- + data->CheckBgMargin.left
- + data->CheckMargin.left
+ RECT rcSelection = rect;
+ data->ItemMargin.ApplyTo(rcSelection);
+
+ RECT rcSeparator = rcSelection;
+ data->SeparatorMargin.ApplyTo(rcSeparator);
+
+ RECT rcGutter = rcSelection;
+ rcGutter.right = data->ItemMargin.cxLeftWidth
+ + data->CheckBgMargin.cxLeftWidth
+ + data->CheckMargin.cxLeftWidth