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

Glossary Item Box

SSSetTypePicture Function


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Sets the style and picture for picture cells.

Syntax

C

LPSS_CELLTYPE SSSetTypePicture(HWND hWnd, LPSS_CELLTYPE lpCellType, long Style, LPCTSTR PictName);

C++

LPSS_CELLTYPE TSpread::SetTypePicture(LPSS_CELLTYPE lpCellType, long Style, LPCTSTR PictName);

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 Picture cell style
Use the (|) OR operator and combine the following values as indicated:
Constant Description
VPS_STRETCH Stretches to fit
VPS_MAINTAINSCALE Displays scaled to proportions (only with stretch)
VPS_RESOURCE Displayed picture comes from resource file with a VIEWPICT type
(This facilitates using any format that can be displayed to be included in the resource file.)
VPS_BMP Displays a bitmap file
VPS_ICON Displays an icon file
VPS_HANDLE Specify if the PictName parameter is a pointer to a picture handle
VPS_SCROLL Displays a scroll bar
Use one of the following values:
VPS_NORMAL Displays as is (upper left)
VPS_CENTER Displays centered
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
PictName Name of picture to display

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

Note: The SSSetTypePicture function provides similar settings for picture alignment for the Style parameter to provide backwards compatibility. For example, the values VPS_CENTER and SSS_ALIGN_CENTER both center the picture in the cell. The control aligns the picture according to the last alignment value provided for this parameter.

Return Value

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

See Also

Creating Picture Cells

SSSetCellType, SSSetCellTypeRange, SSSetSheet functions

ActiveX Correspondence

TypePicDefaultText, TypePicMask properties

ActiveX Correspondence

TypePictCenter, TypePictMaintainScale, TypePictPicture, TypePictStretch properties

Copyright © GrapeCity, inc. All rights reserved.