Ver Mensaje Individual
  #3  
Antiguo 12-12-2014
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Reputación: 36
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
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 0clb->Items->Counti++) {
    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(wdt0aux);
      
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
__________________
Daniel Didriksen

Guía de estilo - Uso de las etiquetas - La otra guía de estilo ....
Responder Con Cita