<< Return to Main Index

< Return to Class Index

CGXMouseWheelPlugin::OnIMouseGetZoom

virtual int OnIMouseGetZoom();

Return Value

The zoom factor in the range from 1 to 1000. 100 is the original size. If zooming is not supported by the parent window or view the return value is 0.

Remarks

Called to determine the current zoom factor of the view or window. The default implementation of this method sends a WM_GX_IMOUSE_GETZOOM message to the parent window and returns the message' result.

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_GETZOOM 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_GETZOOM, OnImouseGetZoom)
END_MESSAGE_MAP()

LRESULT CMyView::OnImouseGetZoom(WPARAM /*wParam*/, LPARAM /*lParam*/)
{
   return m_nZoom;
}

CGXMouseWheelPlugin

Class Overview | Class Members