c++ builder 改变状态栏字体颜色等样式

void __fastcall TForMain::stat1DrawPanel(TStatusBar *StatusBar,
      TStatusPanel *Panel, const TRect &Rect)
{
    TCanvas *pCanvas=stat1->Canvas;
    pCanvas->Font->Color=clGreen;
    pCanvas->Font->Style=TFontStyles()<<fsUnderline;//设置字体样式为下划线
    AnsiString str="http://www.cnblogs.com/zhangdongsheng/";
    pCanvas->TextOut(Rect.left+20,Rect.top+1,str);
}
posted @ 2011-08-22 10:32  瓜蛋  阅读(2576)  评论(0编辑  收藏  举报