AutoSize Example for C++ Builder
This example shows how the AutoSize property works when loading and when rotating an image.
LEADRasterProcess *pRasterProc;
LEADRasterIO *pRasterIO;
CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL, IID_ILEADRasterIO, (void**)&pRasterIO);
CoCreateInstance(CLSID_LEADRasterProcess, NULL, CLSCTX_ALL, IID_ILEADRasterProcess, (void**)&pRasterProc);
LEADRasterView1->AutoSize = True;
pRasterIO->Load ( LEADRasterView1->Raster, AnsiToOLESTR("v:\\images\\image1.cmp"), 0, 0, 1 ) ;
ShowMessage ( "Control is sized to fit the loaded bitmap" ) ;
pRasterProc->Rotate ( LEADRasterView1->Raster, 4500, ROTATE_RESIZE, RGB(0, 0, 0)) ;
ShowMessage ( "Control is sized to fit the rotated bitmap" ) ;
pRasterProc-> Release();
pRasterIO-> Release();