This example draws a selection rectangle on an image and zooms in on the area bound by the rectangle.
void CImgEdit1Dlg::OnZoomto()
{
// This would draw a rectangle on an image and would
// zoom in on the area bound by the rectangle
// Enable rectangle drawing
ImgEdit1.SetSelectionRectangle(TRUE);
// Draw rectangle
ImgEdit1.DrawSelectionRect( 150, 200, 400, 400);
ImgEdit1.ZoomToSelection();
}