AutoSize Example for C++ 5.0 and later
This example shows how the AutoSize property works when loading and when rotating an image.
ILEADRasterIO *pRasterIO=NULL;
ILEADRasterProcess *pRasterProc=NULL;
CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL,
IID_ILEADRasterIO, (void**)&pRasterIO);
CoCreateInstance(CLSID_LEADRasterProcess, NULL, CLSCTX_ALL,
IID_ILEADRasterProcess, (void**)&pRasterProc);
m_LEADRasterView1.SetAutoSize(TRUE);
pRasterIO->Load(m_LEADRasterView1.GetRaster(),
"v:\\images\\eagle.cmp", 0, 0, 1);
MessageBox (TEXT("Control is sized to fit the loaded bitmap"), TEXT("Notice"), MB_OK);
pRasterProc->Rotate(m_LEADRasterView1.GetRaster(),
4500, ROTATE_RESIZE, RGB(0,0,0));
MessageBox (TEXT("Control is sized to fit the rotated bitmap"), TEXT("Notice"), MB_OK);
pRasterIO->Release();
pRasterProc->Release();