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

Glossary Item Box

SSSetTypeTime Function


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Sets the style, format, and minimum and maximum values for time cells.

Syntax

C

LPSS_CELLTYPE SSSetTypeTime(HWND hWnd, LPSS_CELLTYPE lpCellType, long Style, LPSS_TIMEFORMAT lpFormat, LPSS_TIME lpMin, LPSS_TIME lpMax);

C++

LPSS_CELLTYPE TSpread::SetTypeTime(LPSS_CELLTYPE lpCellType, long Style, LPSS_TIMEFORMAT lpFormat, LPSS_TIME lpMin, LPSS_TIME lpMax);

Parameters

The following parameters are available:

Parameter Description
hWnd Window handle of the fpSpread control
lpCellType Pointer to structure to contain cell type information
Style Time cell style
Use the (|) OR operator and combine the following values as indicated:
Constant Description
TS_SECONDS Includes seconds in displayed time value
(By default, only the hours and minutes are displayed.)
TS_SPIN Displays spin button in cell
SSS_ELLIPSES Displays an ellipsis (...)when text is too long to fit in the cell
Use one of the following values:
TS_12HOUR (Default) Displays time in 12-hour format with an A.M. or P.M. designator
TS_24HOUR Displays time in 24-hour format
Use one of the following values:
SSS_ALIGN_TOP (Default) Aligns text at the top of cells
SSS_ALIGN_BOTTOM Aligns text at the bottom of cells
SSS_ALIGN_VCENTER Centers text vertically within the cell
Use one of the following values:
SSS_ALIGN_LEFT (Default) Aligns text to the left in the cell
SSS_ALIGN_RIGHT Aligns text to the right in the cell
SSS_ALIGN_CENTER Centers text horizontally within the cell
Use one of the following values:
SSS_TEXTORIENT_VERT_LTR Displays text vertically in the cell and wraps from left to right
SSS_TEXTORIENT_DOWN Rotates text 90 degrees (to "3 o'clock")
SSS_TEXTORIENT_UP Rotates text 270 degrees (to "9 o'clock")
SSS_TEXTORIENT_INVERT Rotates text 180 degrees (to "6 o'clock")
SSS_TEXTORIENT_VERT_RTL Displays text vertically in the cell and wraps from right to left
lpFormat Pointer to the SS_TIMEFORMAT structure containing time format parameters
Pass a NULL value instead of passing a pointer to the structure if you want to use the settings specified by the Style parameter or if you want to use the default settings for time format.
lpMin Pointer to structure containing minimum valid time
lpMax Pointer to structure containing maximum valid time

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.

This function initializes a cell type structure to a time type.

This function initializes a structure of the specified type (SS_CELLTYPE). You can use this structure to set an individual cell or block of cells using the SSSetCellType or SSSetCellTypeRange functions.

To determine the time format and separator character used in the Spread control, the control uses the values passed in the SS_TIMEFORMAT structure. If the structure is not passed to the SSSetTypeTime function, the control looks at the values specified in the Style parameter of the SSSetTypeTime function for the time format and uses the Time separator setting in the Windows Control Panel. If no value is specified in the Style parameter for the time format, the control uses the Time format setting in the Windows Control Panel.

Note: The control does not recognize changes made to the regional Windows settings until you restart your development environment or your application (or perform any operation that unloads and reloads the current control files). For more information about regional settings and Windows operating environments, see Variations in Windows Regional Settings or Options.

The value specified for the lpMax parameter is the maximum time value the control allows the user to type or paste into the time cell. Values larger than the specified maximum value can still be added to the cell in code at run time.

The value specified for the lpMin parameter is the minimum time value the control allows the user to type or paste into the time cell. Values smaller than the specified minimum value can still be added to the cell in code at run time.

Return Value

Pointer to the SS_CELLTYPE structure, or NULL if any of the parameters are invalid.

See Also

Variations in Windows Regional Settings or Options
Creating Time Cells

SSSetCellType, SSSetCellTypeRange, SSSetSheet functions

SS_TIMEFORMAT structure

ActiveX Correspondence

TypeSpin, TypeTime24Hour, TypeTimeMax, TypeTimeMin, TypeTimeSeconds TypeTimeSeparator properties

Copyright © GrapeCity, inc. All rights reserved.