如何向 DrawGrid 控件写入一个圆形?各位大侠请帮助一下.
如何向 DrawGrid 控件写入一个圆形?
[解决办法]
写入?
以下代码是在某个单元格画一个圆形:
void __fastcall TForm1::DrawGrid1DrawCell(TObject *Sender, int ACol,
int ARow, TRect &Rect, TGridDrawState State)
{
if(ACol == 1 && ARow == 1)
{
TDrawGrid *dg = (TDrawGrid *)Sender;
int nHeight = Rect.Bottom - Rect.Top;
dg-> Canvas-> Ellipse(Rect.Left, Rect.Top,
Rect.Left + nHeight, Rect.Top + nHeight);
}
}