Spread 8.0 Documentation
SSAddCustomFunctionExt Function
Support Options
DLL Reference > DLL Functions > SSAddCustomFunctionExt Function

Glossary Item Box

SSAddCustomFunctionExt Function


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Adds a custom function with a variable number of parameters to the fpSpread control's equation parser.

Syntax

C

BOOL SSAddCustomFunctionExt(HWND hWnd, LPCTSTR lpszFuncName, short nMinParamCnt, short nMaxParamCnt, FARPROC lpfnFuncProc, long lFlags);

C++

BOOL TSpread::AddCustomFunctionExt(LPCTSTR lpszFuncName, short nMinParamCnt, short nMaxParamCnt, FARPROC lpfnFuncProc, long lFlags);

Parameters

The following parameters are available:

Parameter Description
hWnd Window handle of the fpSpread control
lpszFuncName Pointer to a string defining the function name
nMinParamCnt Minimum number of parameters required by the function
nMaxParamCnt Maximum number of parameters required by the function
lpfnFuncProc A procedure instance for the callback function used to perform the user-defined function
lFlags Requests references instead of cell values
Combine either of the following values with the (|) OR operator:
Constant Description
SS_CUSTFUNC_WANTCELLREF Function receives cell references
SS_CUSTFUNC_WANTRANGEREF Function receives range references

Remarks

This function is applied to the entire workbook, including all sheets in the control.

The user-defined function has the following syntax:

int CALLBACK lpFunc(LPSS_VALUE lpResult, LPSS_VALUE lpValues, short nValueCnt);

Parameter Description
lpResult Pointer to structure with result
lpValues Pointer to an array of values
nValueCnt Number of values in array

Return Value

TRUE if the function completes successfully; FALSE otherwise.

See Also

Creating and Using Custom Functions

SSAddCustomFunction function

ActiveX Correspondence

AddCustomFunctionExt method

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.