PCDRes example for C++ 5.0 and later

This example checks for a high resolution image and loads it if possible.

ILEADRasterIO *pRasterIO=NULL;
CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL,
                 IID_ILEADRasterIO, (void**)&pRasterIO);
CString myfile(TEXT("s:\\temp\\images\\ike\\0795image01.pcd")); // No PCD sample image is included with LEADTOOLS
pRasterIO->GetFileInfo(m_LEADRasterView1.GetRaster(),
                       LPCTSTR(myfile), 0, 0 );
CString msg;
if(pRasterIO->GetInfoPCDRes(PCDRES_4BASE))
{
  pRasterIO->PutPCDRes(PCDRES_4BASE);
  msg = TEXT("Loading 1024 x 1536 resolution");
}
else
{
  pRasterIO->PutPCDRes(PCDRES_BASE);
  msg = TEXT("Loading 512 x 768 resolution");

}
MessageBox(msg);
BeginWaitCursor();
// Turn on the automatic display rectangles and the scroll bars.
m_LEADRasterView1.SetAutoSetRects(TRUE);
m_LEADRasterView1.SetAutoScroll(TRUE);
// Load the file.
pRasterIO->Load(m_LEADRasterView1.GetRaster(),
                LPCTSTR(myfile), 0, 0, 1);
m_LEADRasterView1.ForceRepaint();
pRasterIO->Release();
EndWaitCursor();