DLL
To format a time cell
-
Call the SSSetTypeTime function and set the parameters as follows:
- Set the Style parameter to TS_12HOUR or TS_24HOUR to specify whether the cell displays time in the 12- or 24-hour time format.
- Set the Style parameter to TS_SECONDS to display seconds in the time value.
- Set the Style parameter to TS_SPIN to display a spin button in the cell.
- Set the Style parameter to specify the text alignment.
You can also use the lpFormat parameter to point to the SS_TIMEFORMAT structure. Set the fields for the SS_TIMEFORMAT structure as follows:To specify this format characteristic . . . Use this field . . . Separator character cSeparator Displays spin button bSpin Displays seconds bSeconds Time format b24Hour - Call the SSSetCellType or SSSetCellTypeRange function and set the CellType parameter to SS_TYPE_TIME.