OnZoom

3D Graph

Function Group
OnZoom() Functions    Prev page: OnRotateNext page: Graph3D Events    
Function Declared in:
NiGraph3DEvents.h

'Declaration' icon -- Shortcut to top of page. Declaration

void OnZoom(
    VARIANT FAR* NewDistance);

'Description' icon -- Shortcut to top of page. Description

Generated when you zoom in or out on the plot.

Notes:

1. This event is generated only if the CNiGraph.TrackMode property is set to TrackZoomPanRotate.

2. Zooming is performed by holding down the <Alt> key and the left mouse button and moving the mouse forward and backward.

3. Zooming also can be performed by rotating the mouse wheel if your mouse is equipped with one. Press and hold the <Ctrl> key to decrease the granularity of zooming with the mouse wheel.

Shortcut to top of page. Parameters

VARIANT FAR* NewDistance

New distance of the viewing position from the origin.

Note: Use CNiVariant to get to the underlying data.

'See Also' icon -- Shortcut to top of page. See Also

Shortcut to top of page. Example

void OnZoomCwgraph3d1(VARIANT FAR* NewDistance) {
   if (CNiVariant(NewDistance) < 50) {
       *NewDistance = CNiVariant(50);
   }
}