Ein Bitmap in einen Statusbar malen

void __fastcall TForm1::StatusBar1DrawPanel(TStatusBar *StatusBar, TStatusPanel *Panel, const TRect &Rect)
{
    if (Panel->Index == 0) //Change this line if you want another panel
    {
        Graphics::TBitmap *tmpBitmap=new Graphics::TBitmap();
        tmpBitmap->LoadFromFile("bac.bmp");
        StatusBar->Canvas->Draw(Rect.Left,Rect.Top,tmpBitmap);
        delete tmpBitmap;
    }
}

Schreibe einen Kommentar