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

Glossary Item Box

SSSelModeSendMessage Function


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Sets or returns selection information for the sheet.

Syntax

C

long SSSelModeSendMessage(HWND hWnd, UINT uMsg, long lParam1, long lParam2, long lParam3);

C++

long TSpread::SelModeSendMessage(UINT uMsg, long lParam1, long lParam2, long lParam3);

Parameters

The following parameters are available:

Parameter Description
hWnd Window handle of the fpSpread control
uMsg Message used to set or return selection information
(Refer to the list of available messages in the table in the Remarks section.)
lParam1 Varies depending on the specific message
lParam2 Varies depending on the specific message
lParam3 Varies depending on the specific message

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 messages available vary depending on the operation mode of the fpSpread control as set by the SSSetOperationMode function. This function has an effect only when the sheet is in single-selection, multiple-selection, or extended-selection operation mode.

The cell can be sent one of the following messages. After each message, the Param1, Param2, and Param3 descriptions provide the values you can use in the SSSelModeSendMessage function.

The following table provides the return value for each message.

Message Description
SS_SELMODE_CLEARSEL Clears all selected rows
(Valid only for multiple- or extended-selection mode.)
Param1 Not used
Param2 Not used
Param3 Not used
Return None
SS_SELMODE_GETCURSEL Returns the selected row
(Valid only for single-selection mode.)
Param1 Not used
Param2 Not used
Param3 Not used
Return Selected row
SS_SELMODE_GETSEL Returns the selection state of a row
(Valid only for single, multiple-, or extended-selection mode.)
Param1 Row number
Param2 Not used
Param3 Not used
Return TRUE if the row is currently selected; FALSE otherwise.
SS_SELMODE_GETSELCOUNT Returns the number of selected rows
(Valid only for multiple- or extended-selection mode.)
Param1 Not used
Param2 Not used
Param3 Not used
Return Number of selected rows
SS_SELMODE_GETSELITEM Returns a selected row
Param1 Previous selected row
Param2 Not used
Param3 Not used
Return Selected row
SS_SELMODE_GETSELITEMS Returns a list of selected rows
(Valid only for multiple- or extended-selection mode.)
Param1 Maximum number of selected rows whose row numbers are to be placed in the buffer
Param2 Pointer to a buffer large enough to hold the number of SS_COORDs specified by the Param1 parameter
Param3 Not used
Return Actual number of row numbers placed in the buffer
(If in single-selection mode, a value of –1 is returned, otherwise, a value of 0 is returned.)
SS_SELMODE_SELITEMRANGE Selects or removes selection from one or more consecutive rows
(Valid only for multiple- or extended-selection mode.)
Param1 Specifies the selection state of the block of items
(A nonzero value selects the block of rows. A value of 0 removes the selection state.)
Param2 First row number
Param3 Last row number
Return If in single-selection mode, a value of –1 is returned; otherwise, a value of 0 is returned.
SS_SELMODE_SETCURSEL Sets the currently selected row
(Valid only for single-selection mode.)
Param1 Row number of row to select
Param2 Not used
Param3 Not used
Return If in multiple-selection mode, a value of –1 is returned; otherwise, a value of 0 is returned.
SS_SELMODE_SETSEL Sets the selection state of a row
(Valid only for multiple- or extended-selection mode.)
Param1 Selection state of the row
(A nonzero value selects the row. A value of 0 removes the selection state.)
Param2 Row number
(If a value of SS_ALLROWS is specified, the selection is added to or removed from all rows, depending on the value of Param1.)
Param3 Not used
Return If in single selection mode, a value of –1 is returned; otherwise, a value of 0 is returned.

Return Value

Return value depends on the message sent (see the table in the Remarks section).

See Also

SSSetOperationMode, SSSetSheet functions

ActiveX Correspondence

SelModeIndex, SelModeSelected properties
GetMultiSelItem method

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