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
//Display resolution stored in WMF
//Note that InfoXRes and InfoYRes will return the same value
LEADRasterIO* pRasterIO= NULL;
CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL, IID_ILEADRasterIO, (void**)&pRasterIO);
pRasterIO->GetFileInfo (LEADRasterView1->Raster,
AnsiToOLESTR("v:\\images\\Test.wmf"),0, 0 ) ;
ShowMessage ("InfoXRes: " + IntToStr ((int)pRasterIO->InfoXRes) + " InfoYRes: " +
IntToStr ((int)pRasterIO->InfoYRes)) ;
//Set resolution so WMF is loaded at 150 dpi
pRasterIO->WMFResolution = 150;
pRasterIO->Load (LEADRasterView1->Raster,
AnsiToOLESTR("v:\\images\\Test.wmf"),
0, 0, 1);
pRasterIO-> Release( );