Spread 8.0 Documentation
SpvGetZoomState, SpvSetZoomState Functions
Support Options
DLL Reference > DLL Functions > SpvGetZoomState, SpvSetZoomState Functions

Glossary Item Box

SpvGetZoomState, SpvSetZoomState Functions


See Also    ActiveX

Applies To

fpSpreadPreview DLL control

Description

Set or return the way the control zooms between different views of the displayed pages.

Syntax

C

int SpvGetZoomState(HWND hWnd, short FAR *lpValue);

int SpvSetZoomState(HWND hWnd, short value);

C++

short TPreview::GetZoomState(void);

int TPreview::SetZoomState(short value);

Parameters

The SpvGetZoomState function has the following parameters:

Parameter Description
hWnd Window handle of the fpSpreadPreview control
lpValue Pointer to variable that receives zoom state setting

The SpvSetZoomState function has the following parameters:

Parameter Description
hWnd Window handle of the fpSpreadPreview control
value Specifies the way the control zooms between different views
Use one of the following values:
Constant Description
SPV_ZOOMSTATE_INDETERMINATE Returned state when zoom is neither at in or out percentage
SPV_ZOOMSTATE_IN Zooms to 100%
SPV_ZOOMSTATE_OUT Zooms to a size smaller than 100%
SPV_ZOOMSTATE_SWITCH Zooms either in or out, depending on current view

Remarks

Call the SpvSetZoomState function to programmatically zoom the view in or out (changes the percentage between 100% and a smaller percentage, depending on the view). By calling the SpvSetZoomState function, you can specify to zoom in or out, or to switch from whatever the current view displays.

When the SpvSetPageViewType function's value parameter is set to SPV_VIEWTYPE_PERCENTAGE and the SpvSetPageViewPercentage function's value parameter is set to 100, setting the SpvSetZoomState function's value parameter to SPV_ZOOMSTATE_IN does not have an effect.

By default, users can zoom in or out by clicking a page in the preview area. You can prevent them from zooming using the mouse by calling the SpvSetAllowUserZoom function and setting the value parameter to FALSE.

Return Value

SpvGetZoomState: For C users, 1 if the function completes successfully; 0 otherwise. For C++ users, the setting for the function.
SpvSetZoomState: 1 if the function completes successfully; 0 otherwise.

See Also

SpvSetAllowUserZoom, SpvSetPageViewPercentage, SpvSetPageViewType functions

ActiveX Correspondence

ZoomState property

Copyright © GrapeCity, inc. All rights reserved.