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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BCB Linker can't find TMetafileCanvas

Status
Not open for further replies.

BubbaDave

Programmer
Dec 30, 2000
23
US
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::paintBoxPaint(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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top