CGXMouseWheelPlugin::OnIMouseSetZoom

virtual void OnIMouseSetZoom(int nZoom);

nZoom

The zoom factor in the range from 1 to 1000. 100 is the original size.

Remarks

Called to change the current zoom factor of the view or window. The default implementation of this method sends a WM_GX_IMOUSE_SETZOOM message to the parent window.

In order to add support for mouse-wheel zooming in your view or window you have the option to add a message map entry for the WM_GX_IMOUSE_SETZOOM message in your parent window or to subclass CGXMouseWheelPlugin and override this method.

Example

Here is a sample message map handler:

BEGIN_MESSAGE_MAP(CMyView, CScrollView)
   ON_MESSAGE(WM_GX_IMOUSE_SETZOOM, OnImouseSetZoom)
END_MESSAGE_MAP()
LRESULT CMyView::OnImouseSetZoom(WPARAM wParam, LPARAM /*lParam*/)
{
   // This is just to show you that the intelli-mouse plugin
   // sends you a zoom message. Zooming must be implemented
   // in your view.
   TRACE("Zoom to %d\n", wParam);
   m_nZoom = (int) wParam;
   return 0;
}

CGXMouseWheelPlugin

 Class Overview |  Class Members