I am trying to transfer a bitmap that I have in a ASG cell into a TPicture. My code below fails on picture1->Load( AdvStringGrid1->GetBitmap(Col, Row) ); Is this possible? How can I load a picture from ASG cell into TPicture?
void __fastcall TForm::Image1Click(TObject *Sender)
{
int Col=0, Row=2;
// Create a TPicture instance to hold the image
TPicture *picture1 = new TPicture;
// Load the image from AdvStringGrid1
picture1->Load( AdvStringGrid1->GetBitmap(Col, Row) ); //FAIL
// Assign the loaded image to the TImage component
Image1->Picture->Assign(picture);
// Free the TPicture instance
delete picture;
}