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

Glossary Item Box

SSSetTypeCheckBox Function


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Sets the style, text, and pictures displayed in check box cells.

Syntax

C

LPSS_CELLTYPE SSSetTypeCheckBox(HWND hWnd, LPSS_CELLTYPE lpCellType, long lStyle, LPCTSTR lpText, LPCTSTR lpPictUp, WORD wPictUpType, LPCTSTR lpPictDown, WORD wPictDownType, LPCTSTR lpPictFocusUp, WORD wPictFocusUpType, LPCTSTR lpPictFocusDown, WORD wPictFocusDownType, LPCTSTR lpPictGray, WORD wPictGrayType, LPCTSTR lpPictFocusGray, WORD wPictFocusGrayType);

C++

LPSS_CELLTYPE TSpread::SetTypeCheckBox(LPSS_CELLTYPE lpCellType, long lStyle, LPCTSTR lpText, LPCTSTR lpPictUp, WORD wPictUpType, LPCTSTR lpPictDown, WORD wPictDownType, LPCTSTR lpPictFocusUp, WORD wPictFocusUpType, LPCTSTR lpPictFocusDown, WORD wPictFocusDownType, LPCTSTR lpPictGray, WORD wPictGrayType, LPCTSTR lpPictFocusGray, WORD wPictFocusGrayType);

Parameters

The following parameters are available:

Parameter Description
hWnd Window handle of the fpSpread control
lpCellType Pointer to structure to contain cell type information
lStyle Check box style
Use the (|) OR operator and combine the following values as indicated:
Constant Description
BS_LEFTTEXT Displays text to left of check box
BS_CENTER Centers button and text in cell
BS_AUTO3STATE Creates three-state check box
Use one of the following values:
SSS_ALIGN_TOP Aligns text at the top of cells
SSS_ALIGN_BOTTOM Aligns text at the bottom of cells
SSS_ALIGN_VCENTER (Default) 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
lpText Optional text to display in cell
lpPictUp Name of picture to use when check box is cleared (FALSE state)
(If the BT_HANDLE style is specified for the wPictUpType parameter, this variable contains a pointer to the appropriate handle. Set this parameter to NULL to display default square check box.)
wPictUpType Type of picture to use when check box is cleared (FALSE state)
Use one of the following values:
Constant Description
BT_NONE No picture
(Choose this value to display the default square check box.)
BT_ICON Icon
BT_BITMAP Bitmap
(Choose this value and set all type parameters to NULL to display only check box text with no square check box.)
BT_HANDLE You can combine this value with the other available values using the (|) OR operator to provide a handle
lpPictDown Name of picture to use when check box is selected (TRUE state)
(If the BT_HANDLE style is specified for the wPictDownType parameter, this variable contains a pointer to the appropriate handle. Set this parameter to NULL to display default square check box with check mark.)
wPictDownType Type of picture to use when check box is selected (TRUE state)
(Same values as listed for the wPictUpType parameter.)
lpPictFocusUp Name of picture to use when check box is cleared (FALSE state) and pressed
(If the BT_HANDLE style is specified for the wPictFocusUpType parameter, this variable contains a pointer to the appropriate handle. Set this parameter to NULL to display default square check box.)
wPictFocusUpType Type of picture to use when check box is cleared (FALSE state) and pressed
(Same values as listed for the wPictUpType parameter.)
lpPictFocusDown Name of picture to use when check box is selected (TRUE state) and pressed
(If the BT_HANDLE style is specified for the wPictFocusDownType parameter, this variable contains a pointer to the appropriate handle. Set this parameter to NULL to display default square check box with check mark.)
wPictFocusDownType Type of picture to use when check box is selected (TRUE state) and pressed
(Same values as listed for the wPictUpType parameter.)
lpPictGray Name of picture to use when check box is grayed (indeterminate state)
(If the BT_HANDLE style is specified for the wPictGrayType parameter, this variable contains a pointer to the appropriate handle. Set this parameter to NULL to display default square check box.)
wPictGrayType Type of picture to use when check box is grayed (indeterminate state)
(Same values as listed for the wPictUpType parameter.)
lpPictFocusGray Name of picture to use when check box is grayed (indeterminate state) and pressed
(If the BT_HANDLE style is specified for the wPictFocusGrayType parameter, this variable contains a pointer to the appropriate handle. Set this parameter to NULL to display default square check box.)
wPictFocusGrayType Type of picture to use when check box is grayed (indeterminate state) and pressed
(Same values as listed for the wPictUpType parameter.)

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.

Use the SSSetTypeCheckBox function to create a two-state or three-state check box.

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.

Note: The SSSetTypeCheckBox function provides similar settings for alignment for the lStyle parameter to provide backwards compatibility. For example, the values BS_CENTER and SSS_ALIGN_CENTER both center the contents of the cell horizontally. The control aligns the contents according to the last alignment value provided for this parameter.

Return Value

Pointer to the SS_CELLTYPE structure, or NULL if an error occurs.

See Also

Creating Check Box Cells

SSSetCellType, SSSetCellTypeRange, SSSetSheet functions

ActiveX Correspondence

TypeCheckCenter, TypeCheckPicture, TypeCheckText, TypeCheckTextAlign, TypeCheckType properties

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