Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I am trying to copy Image->Picture to the clipboard.

Status
Not open for further replies.

DoNotEven

Programmer
Dec 21, 2000
89
US
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?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top