Пример #1
0
void CTWenUGCtrlEx::AppendRow_ButtonAdd(void)
{
	int nRow = CUGCtrl::GetNumberRows();

	if(nRow > 0)
	{
		CUGCell cell;
		GetCell(0, nRow-1, &cell);

		if(cell.GetBitmap()==GetBitmap(m_nIndexBMP_Add))//如果有增加行
		{
			return;
		}
	}

	if(AppendRow() != UG_SUCCESS) return;

	int nCol = GetNumberCols();

	JoinCells(1, nRow, nCol-1, nRow);

	if(nCol>1)
	{
		QuickSetBackColor(1, nRow, RGB(240,240,240));
		QuickSetBorder(1, nRow, UG_BDR_RAISED|UG_BDR_LTHIN|UG_BDR_RTHIN|UG_BDR_TTHIN|UG_BDR_BTHIN); 
	}

	QuickSetBitmap(0, nRow, m_nIndexBMP_Add);
}
Пример #2
0
void CDDBaseGrid::SetCellRangeBackColor(int col1, int row1, int col2, int row2, COLORREF backColor)
{
   for (int col = col1; col <= col2; col++)
      for (int row = row1; row <= row2; row++)
         QuickSetBackColor(col, row, backColor);

}