Hola aguml.
Te pongo otra alternativa:
Código PHP:
...
#include<clipbrd.hpp>
// Juntar Bitmaps y copiar a Clipboard
void BitmapsToClipboard(TCheckListBox *clb)
{
Graphics::TBitmap *sum = new (Graphics::TBitmap);
int wdt = 0;
for(int i = 0; i < clb->Items->Count; i++) {
if (clb->Checked[i]) {
//cargar bmp
Graphics::TBitmap *aux = new (Graphics::TBitmap);
aux->LoadFromFile(clb->Items->Strings[i] + ".bmp");
// ajustar tamaño
if(aux->Height > sum->Height)
sum->Height = aux->Height;
sum->Width += aux->Width;
// dibujar
sum->Canvas->Draw(wdt, 0, aux);
wdt+= aux->Width;
delete aux;
}
Clipboard()->Assign(sum);
}
delete sum;
}
Llamada ejemplo:
Código PHP:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
BitmapsToClipboard(CheckListBox1);
}
Salida:
Pegado en MsPaint:
En cuanto a tu consulta, en la ayuda de C++ Builder dice:
Cita:
VCL Reference
TObject::Free
TObject See also
____________________________________________________________________________
Destroys an object and frees its associated memory, if necessary.
__fastcall Free();
Description
Do not call the Free method of an object. Instead, use the delete keyword, which invokes Free to destroy an object. Free automatically calls the destructor if the object reference is not NULL.
|
Saludos