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

Glossary Item Box

SSSetTypeOwnerDraw Function


See Also    ActiveX    Example

Applies To

fpSpread DLL control

Description

Sets the style for owner-drawn cells.

Syntax

C

LPSS_CELLTYPE SSSetTypeOwnerDraw(HWND hWnd, LPSS_CELLTYPE lpCellType, long lStyle);

C++

LPSS_CELLTYPE TSpread::SetTypeOwnerDraw(LPSS_CELLTYPE lpCellType, long lStyle);

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 Styles for use by the application
(All style bits are reserved for the application and are passed to the parent when the cell is drawn.)

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 allows the application to set an owner-drawn cell type to be used within a cell. This cell is static and the application is responsible for drawing the contents of the cell each time the cell needs to be repainted.

Each time the cell needs to be drawn, an SSM_DRAWITEM message is sent to the parent of the control. The lParam of the SSM_DRAWITEM message contains the LPSS_DRAWITEMSTRUCT. The application should use the structure item to perform the drawing. The wParam is not used.

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

The value of the lpCellType parameter, or NULL if an error occurs.

See Also

Creating Owner-Drawn Cells

SSSetCellType, SSSetCellTypeRange, SSSetSheet functions

SSM_DRAWITEM message

SS_DRAWITEMSTRUCT structure

ActiveX Correspondence

TypeOwnerDrawStyle property

Copyright © GrapeCity, inc. All rights reserved.