LoadFromResourceName (C++)
From RAD Studio XE2 Code Examples
Language:
Description
This example requires a resource file in the sources directory.
Code
#pragma resource "extrares.res" #include <memory> //For STL auto_ptr class void __fastcall TForm1::Button1Click(TObject *Sender) { std::auto_ptr<Graphics::TBitmap> Bitmap1(new Graphics::TBitmap()); try { Bitmap1->LoadFromResourceName((int)HInstance, "Live"); Canvas->Draw(12,12,Bitmap1.get()); } catch (...) { MessageBeep(0); } }
Uses
- Vcl.Graphics.TBitmap.LoadFromResourceName ( fr | de | ja )
- Vcl.Graphics.TBitmap.Create ( fr | de | ja )