CGXGridCore::SubtractBorders
virtual CRect SubtractBorders(const CRect& rect, const CGXStyle&style, BOOL bSubtrLines = TRUE);
rect
The drawing rectangle for the cell with borders.
style
A reference to the style-object of the cell.
bSubtrLines
Specifies if space needed for grid lines shall also be subtracted from the rectangle specified by rect.
Return Value
Returns the pure drawing area for the cell without borders.
Remarks
This method determines which borders are set for the specified cell and subtracts the frame occupied by the borders from the drawing area for the cell.
Example
This method is used by CGXControl to determine the drawing area for the cell.
CRect CGXControl::GetCellRect(ROWCOL nRow, ROWCOL nCol, LPRECT rectItem /* = NULL */)
{
RECT rect;
const CGXStyle& style = Grid( )->LookupStyleRowCol(nRow, nCol);
...
rect = Grid( )->CalcRectFromRowColEx(nRow, nCol);
...
rect = Grid( )->SubtractBorders(rect, style);
return rect;
}