PenWidth Example for 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:\\parrots.jpg"), 0, 0, 1);
pZoomView->SrcLeft
= 0;
pZoomView->SrcTop
= 0;
pZoomView->SrcWidth
= 100;
pZoomView->SrcHeight
= 100;
pZoomView->DstTop
= 100;
pZoomView->DstLeft
= 100;
pZoomView->DstWidth
= 500;
pZoomView->DstHeight
= 500;
pZoomView->BorderColor
= RGB(255, 0, 0);
pZoomView->BorderStyle
= ZOOM_VIEW_BORDERSTYLE_TEAROUT | ZOOM_VIEW_BORDERSTYLE_SIMPLE;
pZoomView->PenWidth
= 2;
pZoomView->SrcBorderColor
= RGB(255, 0, 0);
pZoomView->SrcBorderStyle
= SOURCE_BORDERSTYLE_SIMPLE;
pZoomView->SrcPenWidth
= 2;
pZoomView->EnableCallouts
= TRUE;
pZoomView->CalloutColor
= RGB(0, 0, 255);
pZoomView->CalloutPenWidth
= 2;
pZoomView->ZoomFactor
= 200;
pZoomView->Enabled
= TRUE;
pZoomView->ForceDst =
TRUE;
pZoomView->AnnContainer
= 0;
m_RasterView.CreateZoomView(pZoomView);
pZoomView->Release();
pRasterIO->Release();