これは、TDBGrid コンポーネントの描画ルーチンがどのように見えるかです。いくつかのルールに基づいてデータベースの値を置き換えています:
void __fastcall TForm_Loadpoint_Details::DBGrid1DrawColumnCell(
TObject *Sender, const TRect &Rect, int DataCol, TColumn *Column,
TGridDrawState State)
{
int row_index = ???;
AnsiString text = GetCustomizedText(row_index, DataCol);
DrawText(text);
}
ただし、現在レンダリングされている行を確認する方法がわかりません。この知識がなければ、表示するデータを取得できません。