CreateZoomView Example for Visual C++ 5.0 and later
ILEADRasterIO * pRasterIO = NULL;
ILEADRasterZoomView * pZoomView;
HRESULT hr = CoCreateInstance(
CLSID_LEADRasterZoomView,
NULL,
CLSCTX_ALL,
IID_ILEADRasterZoomView,
(void**)&pZoomView
);
hr = CoCreateInstance(
CLSID_LEADRasterIO,
NULL,
CLSCTX_ALL,
IID_ILEADRasterIO,
(void**)&pRasterIO
);
//L_KEY_DOCUMENT represents the unlock support string
m_RasterView.GetRaster().UnlockSupport(L_SUPPORT_DOCUMENT, L_KEY_DOCUMENT);
pRasterIO->Load(m_RasterView.GetRaster(), TEXT("c:\\ocr1.tif"), 0, 0, 1);
pZoomView->SrcLeft = 0;
pZoomView->SrcTop = 0;
pZoomView->SrcWidth = 100*100;
pZoomView->SrcHeight = 100*100;
pZoomView->DstTop = 100*100;
pZoomView->DstLeft = 100*100;
pZoomView->DstWidth = 200*100;
pZoomView->DstHeight = 200*100;
pZoomView->BorderColor = RGB(255, 0, 0);
pZoomView->BorderStyle = ZOOM_VIEW_BORDERSTYLE_ROUNDED;
pZoomView->PenStyle = PEN_STYLE_DASHDOTDOT;
pZoomView->SrcBorderColor = RGB(255, 0, 0);
pZoomView->SrcBorderStyle = SOURCE_BORDERSTYLE_SIMPLE;
pZoomView->SrcPenStyle = PEN_STYLE_DOT;
pZoomView->EnableCallouts = TRUE;
pZoomView->CalloutColor = RGB(0, 0, 255);
pZoomView->CalloutPenStyle = PEN_STYLE_DASH;
pZoomView->ZoomFactor = 200;
pZoomView->Enabled = TRUE;
pZoomView->ForceDst = TRUE;
pZoomView->AnnContainer = 0;
m_RasterView.SetEnableHiliteZoomView(TRUE);
m_RasterView.CreateZoomView(pZoomView);
pZoomView->Release();
pRasterIO->Release();