MouseWheel example for C++ 5.0 and later

void CMyClass::OnMouseWheel(short nDelta, short Shift, long x, long y)
{
    if (Shift ==2) //CONTROL Key is Pressed
    {
       if(nDelta < 0)
       {
          if (m_LeadView.GetPaintZoomFactor() < 100 * 16)
          {
             m_LeadView.SetPaintZoomFactor(m_LeadView.GetPaintZoomFactor() * 2);
          }
       }
    else
    {
       if (m_LeadView.GetPaintZoomFactor() > 100 / 16)
          m_LeadView.SetPaintZoomFactor(m_LeadView.GetPaintZoomFactor() / 2);
    }
}
    else
    {
       m_LeadView.GetVScrollInfo().SetPos(m_LeadView.GetVScrollInfo().GetPos() - nDelta);
    }
}

void CMyClass::OnLoad()
{
    HRESULT hr;
    ILEADRasterIO *pRasterIO = NULL;
   
    hr = CoCreateInstance(
       CLSID_LEADRasterIO,
       NULL,
       CLSCTX_ALL,
       IID_ILEADRasterIO,
       (void**)&pRasterIO
       );
   
    if(SUCCEEDED(hr))
    {
       pRasterIO->Load((IDispatch *)m_LeadView.GetRaster().m_lpDispatch ,"c:\\1.bmp",0,0,1);
       m_LeadView.SetEnableMouseWheel(TRUE);
    }
   
    pRasterIO->Release();
}