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

Glossary Item Box

SSSetTypePictureHandle Function


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Sets the style, handle, and palette for a picture cell.

Syntax

C

LPSS_CELLTYPE SSSetTypePictureHandle(HWND hWnd, LPSS_CELLTYPE lpCellType, long Style, HANDLE hPict, HPALETTE hPal, BOOL fDeleteHandle);

C++

LPSS_CELLTYPE TSpread::SetTypePictureHandle (LPSS_CELLTYPE lpCellType, long Style,HANDLE hPict, HPALETTE hPal, BOOL fDeleteHandle);

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
Use one of the following values:
VPS_NORMAL Displays as is (upper left)
VPS_STRETCH Stretches to fit
VPS_CENTER Displays centered
VPS_MAINTAINSCALE Displays scaled to proportions (only with stretch)
Use one of the following values:
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 Supplied handle is a bitmap handle
VPS_PCX Supplied handle is a PCX handle
VPS_GIF Supplied handle is a GIF handle
VPS_JPEG Supplied handle is a JPG handle
VPS_HANDLE
VPS_ICON Supplied handle is an icon handle
hPict Handle to graphic
hPal Handle to palette to use with bitmap
(This value can be 0 if no palette is to be used.)
fDeleteHandle Determines whether the Spread control deletes the handle after it is no longer needed

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 using a handle to a graphic.

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.

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

TypePictCenter, TypePictMaintainScale, TypePictPicture, TypePictStretch properties

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