I get error “Access violation at 06402A80 in module “VIEWPICT.EXE” read of address FFFFFFFF.” When I execute the following:
In the Unit1.cpp file:
void __fastcall TMainForm::Copy1Click(TObject *Sender)
{
TChild* child = dynamic_cast<TChild*>(ActiveMDIChild);
if(!child)
{
return;
}
Child->CopyPic(Sender);
}
//---------------------------------------------------------------------------
In the Unit1.h file:
__published: // IDE-managed Components
void __fastcall Copy1Click(TObject *Sender);
In the MDIChild.cpp file:
void __fastcall TChild::CopyPic(TObject *Sender)
{
Clipboard()->Assign(Image->Picture);
}
//---------------------------------------------------------------------------
In the MDIChild.h file:
#include <vcl\Clipbrd.hpp>
__published: // IDE-managed Components
void __fastcall CopyPic(TObject *Sender);
I am trying to copy Image->Picture to the clipboard.
What am I doing wrong?
In the Unit1.cpp file:
void __fastcall TMainForm::Copy1Click(TObject *Sender)
{
TChild* child = dynamic_cast<TChild*>(ActiveMDIChild);
if(!child)
{
return;
}
Child->CopyPic(Sender);
}
//---------------------------------------------------------------------------
In the Unit1.h file:
__published: // IDE-managed Components
void __fastcall Copy1Click(TObject *Sender);
In the MDIChild.cpp file:
void __fastcall TChild::CopyPic(TObject *Sender)
{
Clipboard()->Assign(Image->Picture);
}
//---------------------------------------------------------------------------
In the MDIChild.h file:
#include <vcl\Clipbrd.hpp>
__published: // IDE-managed Components
void __fastcall CopyPic(TObject *Sender);
I am trying to copy Image->Picture to the clipboard.
What am I doing wrong?