WMFResolution example for C++ 5.0 and later
//This example displays the default resolution stored in a WMF,
//changes the resolution to 150 dpi, and then loads the image
CString str;
//Display resolution stored in WMF
//Note that InfoXRes and InfoYRes will return the same value
ILEADRasterIO *pRasterIO=NULL;
CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL,
IID_ILEADRasterIO, (void**)&pRasterIO);
pRasterIO->GetFileInfo(m_LEADRasterView1.GetRaster(),
"v:\\compiler\\vb40\\metafile\\arrows\\2darrow1.wmf",0, 0);
str.Format(TEXT("InfoXRes: %d\nInfoYRes: %d"),
pRasterIO->GetInfoXRes(),
pRasterIO->GetInfoYRes());
AfxMessageBox(str);
//Set resolution so WMF is loaded at 150 dpi
pRasterIO->put_WMFResolution(150);
pRasterIO->Load(m_LEADRasterView1.GetRaster(),
"v:\\compiler\\vb40\\metafile\\arrows\\2darrow1.wmf",0,0,1);
pRasterIO->Release();