SS_BEFOREUSERSORT Structure
Applies To
fpSpread control
Definition
typedef struct ss_beforeusersort
{
SS_COORD lCol;
long lState;
long lDefaultAction;
} SS_BEFOREUSERSORT, FAR *LPSS_BEFOREUSERSORT;
Fields
The following fields are available:
Field | Description | |
---|---|---|
lCol | Column on which sort will occur | |
lState | Current sort state | |
Value | Description | |
0 | Not sorted | |
Constant: BEFOREUSERSORT_STATE_NONE | ||
1 | Ascending sort | |
Constant: BEFOREUSERSORT_STATE_ASCENDING | ||
2 | Descending sort | |
Constant: BEFOREUSERSORT_STATE_DESCENDING | ||
lDefaultAction | Action that will occur Can be set to one of the following values: |
|
Value | Description | |
0 | Cancel sort | |
Constant: BEFOREUSERSORT_DEFAULTACTION_CANCEL | ||
1 | Sort will occur automatically | |
Constant: BEFOREUSERSORT_DEFAULTACTION_AUTOSORT | ||
2 | Sort will occur manually | |
Constant: BEFOREUSERSORT_DEFAULTACTION_MANUALSORT |
Remarks
This structure is used with the SSM_BEFOREUSERSORT message, which is sent when one of the following occurs:
- The user clicks a column header
- The SSSetColUserSortIndicator function's ColUserSortIndicator parameter is set to either 1 (SS_COLUSERSORTINDICATOR_ASCENDING) or 2 (SS_COLUSERSORTINDICATOR_DESCENDING) for a column
and the SSSetUserColAction function's UserColAction parameter is set to either 1 (SS_USERCOLACTION_SORT) or 2 (SS_USERCOLACTION_SORTNOINDICATOR).
If you set the lDefaultAction field to 2 (BEFOREUSERSORT_DEFAULTACTION_MANUALSORT), you should provide code to manually sort the data.
See Also
SSSetColUserSortIndicator, SSSetUserColAction functions
SSM_BEFOREUSERSORT message