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

Glossary Item Box

SSSetTypePic Function


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Sets the style and mask for PIC cells.

Syntax

C

LPSS_CELLTYPE SSSetTypePic(HWND hWnd, LPSS_CELLTYPE lpCellType, long Style, LPCTSTR Mask);

C++

LPSS_CELLTYPE TSpread::SetTypePic(LPSS_CELLTYPE lpCellType, long Style, LPCTSTR Mask);

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 PIC cell style
Use the (|) OR operator and combine the following values as indicated:
SSS_ELLIPSES Displays an ellipsis (...) when text is too long to fit in the cell
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
Mask Mask to use

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 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.

Use a PIC cell to create a mask for user input. Each character in the mask you define directly represents one character to be displayed, with the exception of escape codes, which are prefixed by a slash (/) character. If a character in the defined mask is one of the characters in the following table, the user can type one of the corresponding permitted characters into the mask at that place.

Other characters are considered placeholders. Users cannot type characters in place of placeholders, nor can they delete them. When the user types data into the cell, placeholders are automatically skipped. To specify one of the defined mask characters listed in the following table as a placeholder, type the escape code (/) and then the character.

Use the following characters to design your mask:

Mask character User can type . . .
X Any ASCII character
9 Numeric characters (0–9) and a decimal point
A Alphabetic characters (a–z, A–Z) plus any alphabetic character from larger character sets such as ANSI or Unicode
N Alphanumeric characters (0–9, a–z, A–Z, decimal point)
U Uppercase alphabetic characters (A–Z)
L Lowercase alphabetic characters (a–z)
H Hexadecimal digits (0–9, A–F, a–f)

The defined PIC cell allows users to type or paste, and accepts from code, valid characters into the mask, up to the number of characters defined in the mask. The cell does not allow the user to type or paste invalid characters in the cell, nor does it allow invalid values from code.

Return Value

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

See Also

Creating Mask (PIC) Cells

SSSetCellType, SSSetCellTypeRange, SSSetSheet functions

Copyright © GrapeCity, inc. All rights reserved.