Spread 8.0 Documentation
SSGetCellNote, SSSetCellNote, SSSetCellNoteRange Functions
Support Options
DLL Reference > DLL Functions > SSGetCellNote, SSSetCellNote, SSSetCellNoteRange Functions

Glossary Item Box

SSGetCellNote, SSSetCellNote, SSSetCellNoteRange Functions


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Set or return a comment for the cell or for a block of cells.

Syntax

C

short SSGetCellNote(HWND hWnd, SS_COORD Col, SS_COORD Row, LPTSTR Note);

BOOL SSSetCellNote(HWND hWnd, SS_COORD Col, SS_COORD Row, LPTSTR Note);

BOOL SSSetCellNoteRange(HWND hWnd, SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, LPTSTR Note)

C++

short TSpread::GetCellNote(SS_COORD Col, SS_COORD Row, LPTSTR Note);

BOOL TSpread::SetCellNote(SS_COORD Col, SS_COORD Row, LPTSTR Note);

BOOL TSpread::SetCellNoteRange(SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, LPTSTR Note)

Parameters

The SSGetCellNote function has the following parameters:

Parameter Description
hWnd Window handle of the fpSpread control
Col Column number of cell
Row Row number of cell
Note Cell note text

The SSSetCellNote and SSSetCellNoteRange functions have the following parameters:

Parameter Description
hWnd Window handle of the fpSpread control
Col Column number of cell
Col2 Column number of lower-right cell of the block when defining a block for the SSSetCellNoteRange function
Row Row number of cell
Row2 Row number of lower-right cell of the block when defining a block for the SSSetCellNoteRange function
Note Cell note text

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. To determine the settings you want for the Col, Row, Col2, and Row2 parameters, see Using Column and Row Properties.

Remarks

Cells with notes display a cell note indicator, a red square in the upper right corner of the cell, as shown in the following figure.

Notes:
  • Use caution in choosing a red color as the background for a cell that could contain a cell note. The red cell note indicator could be invisible against a red background.
  • If you set the SSSetCellNoteIndicator function's Value parameter to either 0 (SS_CELLNOTEINDICATOR_SHOWANDFIREEVENT) or 1 (SS_CELLNOTEINDICATOR_SHOWANDDONOTFIREEVENT) and the SSSetBool function's SS_ALLOWCELLOVERFLOW boolean to TRUE, the cell note indicator will appear in the cell that contains the original text.

Cell notes are displayed in a similar manner as text tips. When the pointer is over the cell note indicator, the cell note text appears.

When the control displays the cell note, the SSM_TEXTTIPFETCH message is sent. To display the cell note, set the SSSetTextTip function's Status parameter to a value other than 0 (SS_TT_STATUS_OFF) and set the Show field in the SS_TEXTTIPFETCH structure to TRUE. You can display both text tips and cell notes for a cell. You can call the SSIsFetchCellNote function to determine if the message was sent for a cell note or a text tip and to show and modify the cell notes or text tips accordingly. You can also use the SSSetTextTip function to further customize the cell notes.

The cell note indicator does not appear when the cell is in edit mode. You can also call the SSSetCellNoteIndicator function to hide the cell note indicator and to control whether the SSM_TEXTTIPFETCH message is sent when the pointer is over the cell note indicator.

Return Value

SSGetCellNote: Returns the length of the cell note. The cell note string is returned by the Note parameter. Pass in a NULL value for the Note parameter to just return the length of the cell note.
SSSetCellNote: Nonzero if successful.

See Also

Providing Cell Notes

SSGetCellNoteIndicator, SSIsFetchCellNote, SSSetBool (SS_ALLOWCELLOVERFLOW), SSSetCellNoteIndicator, SSSetSheet, SSSetTextTip functions

SSM_TEXTTIPFETCH message

SS_TEXTTIPFETCH structure

ActiveX Correspondence

CellNote property

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