Hi,
I am trying to write some graphics to an Enhanced Metafile (.emf) format file. I am using TMetafile and TMetafileCanvas to draw and save the graphics. Here is a snippet of my code that does this:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
mfCanvas = new TMetafileCanvas(aMetafile, 0);
mfCanvas->Brush->Color = clRed;
mfCanvas->Rectangle(10,10,100,100);
delete mfCanvas;
PaintBox1->Invalidate();
PaintBoxPaint(Sender);
}
//---------------------------------------------------------------------------
void __fastcall TForm1:
aintBoxPaint(TObject *Sender)
{
PaintBox1->Canvas->Draw(0,0,aMetafile);
}
When I compile, I get this linker error...
Unresolved external'__fastcall Graphics::TMetafileCanvas::TMetafileCanvas(Graphics::TMetafile*, int)' referenced from ....
The TMetafile class is defined in the same header file as TMetafileCanvas (Graphics.hpp).
Does anyone know why TMetafile is recognized but not TMetafileCanvas? Any help will be appreciated.
Thanks,
Dave
I am trying to write some graphics to an Enhanced Metafile (.emf) format file. I am using TMetafile and TMetafileCanvas to draw and save the graphics. Here is a snippet of my code that does this:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
mfCanvas = new TMetafileCanvas(aMetafile, 0);
mfCanvas->Brush->Color = clRed;
mfCanvas->Rectangle(10,10,100,100);
delete mfCanvas;
PaintBox1->Invalidate();
PaintBoxPaint(Sender);
}
//---------------------------------------------------------------------------
void __fastcall TForm1:
{
PaintBox1->Canvas->Draw(0,0,aMetafile);
}
When I compile, I get this linker error...
Unresolved external'__fastcall Graphics::TMetafileCanvas::TMetafileCanvas(Graphics::TMetafile*, int)' referenced from ....
The TMetafile class is defined in the same header file as TMetafileCanvas (Graphics.hpp).
Does anyone know why TMetafile is recognized but not TMetafileCanvas? Any help will be appreciated.
Thanks,
Dave