// 自定义 THintWindow 类
class TCcrunHintWindow : public THintWindow
{
bool FActivating;
__fastcall TCcrunHintWindow(TComponent* Owner)
: THintWindow(Owner)
{
Canvas->Font->Name = \"宋体\";
Canvas->Font->Color = clBlack;
Canvas->Font->Size = 9;
}
void __fastcall Paint(void)
{
TRect rect = ClientRect;
// Hint边框颜色
Canvas->Brush->Color = TColor(0xDBB8BA);
Canvas->FillRect(rect);
// 绘制整个Hint的边框
Canvas->Pen->Color = TColor(0x69230E);
Canvas->Rectangle(rect);
// Hint背景的颜色
Color = clWhite;
// Hint文字透明
Canvas->Brush->Style = bsClear;
// 绘出Hint文字
Canvas->Font->Color = clBlack;
Canvas->TextOut(4, int(rect.Bottom / 2)
- int(Canvas->TextHeight(Caption) / 2), Caption);
}
virtual void __fastcall NCPaint(HDC hdc)