SSSort Function
Applies To
fpSpread DLL control
Description
Sorts a block of cells using the quick sort method.
Syntax
BOOL SSSort(HWND hWnd, SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, LPSS_SORT lpSort);
BOOL TSpread::Sort(SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, LPSS_SORT lpSort);
Parameters
The following parameters are available:
Parameter | Description |
---|---|
hWnd | Window handle of the fpSpread control |
Col | Column number of first column of block (Value can be SS_ALLCOLS to sort only columns.) |
Row | Row number of first row of block (Value can be SS_ALLROWS to sort only rows.) |
Col2 | Column number of last column of block (If Col is SS_ALLCOLS, this value is ignored.) |
Row2 | Row number of last row of block (If Row is SS_ALLROWS, this value is ignored.) |
lpSort | Pointer to SS_SORT structure to set up sort criteria |
To determine the settings you want for the Col, Row, Col2, and Row2 parameters, see Using Column and Row Properties.
Remarks
This function is applied to the current sheet setting unless you first call the SSSetSheet function to specify the sheet for which you are calling this function.
The application controls the sort order as well as the rows or columns that are used as the key references.
If you set the Col (or Row) parameter to 0 and the Col2 (or Row2) parameter to –1 and perform a sort by row (or column), the row (or column) item data will move.
Notes:
|
Return Value
TRUE if the function completes successfully; FALSE otherwise.
See Also
SSGetData, SSSetSheet, SSSortEx functions
SS_SORT structure
ActiveX Correspondence
SortKey, SortKeyOrder properties
Sort method