WMFResolution example for C++ Builder

This example displays the default resolution stored in a WMF, changes the resolution to 150 dpi, and then loads the image

void __fastcall TForm1::LoadWMFClick(TObject *Sender)
{
   AnsiString fileName;

   fileName = "test.wmf";
   // Display resolution stored in WMF
   Lead1->GetFileInfo(fileName, 0);
   ShowMessage("InfoXRes: " + IntToStr(Lead1->InfoXRes) + "\n" + "InfoYRes: " + IntToStr(Lead1->InfoYRes));
   // Set resolution so WMF is loaded at 150 dpi
   Lead1->WMFResolutionX = 150;
   Lead1->WMFResolutionY = 150;
   Lead1->Load(fileName, 0, 0, 1);
}