Главная страница | назад

Article #19582: Loading Bitmaps

 Question and Answer Database

FAQ4582C.txt - Loading Bitmaps

Category   :VCL
Platform   :All-32Bit
Product    :All-CBuilder,   

How do I load a bitmap using the VCL?

To load a bitmap from a file,

Graphics::TBitmap *MyBitmap = new Graphics::TBitmap();

To display it on a canvas,

TRect DestRect;

DestRect.Left = 0;
DestRect.Top = 0;
DestRect.Right = 250;
DestRect.Bottom = 250;

Canvas->StretchDraw(DestRect, MyBitmap);

5/25/99 11:48:18 AM

Last Modified: 01-SEP-99