DrawItem Event
Applies To
fpSpread control
Description
Occurs when the fpSpread control displays an owner-drawn cell.
Syntax
C++
afx_msg void OnDrawItemfpSpread(UINT, int, CWnd*, LPVOID);
Visual Basic
Sub fpSpread_DrawItem(ByVal Col As Long, ByVal Row As Long, ByVal hDC As OLE_HANDLE, ByVal Left As Long, ByVal Top As Long, ByVal Right As Long, ByVal Bottom As Long, ByVal Style As Long)
Parameters
The following parameters are available:
Parameter | Description |
---|---|
Col | Column number of cell being drawn |
Row | Row number of cell being drawn |
hDC | Device context handle of the fpSpread control (This must be used for all painting to the cell.) |
x or Left | Left screen coordinate of the cell being drawn relative to the upper-left corner of the fpSpread control (This value is in twips.) |
y or Top | Top screen coordinate of the cell being drawn relative to the upper-left corner of the fpSpread control (This value is in twips.) |
x2 or Right | Right screen coordinate of the cell being drawn relative to the upper-left corner of the fpSpread control (This value is in twips.) |
y2 or Bottom | Bottom screen coordinate of the cell being drawn relative to the upper-left corner of the fpSpread control (This value is in twips.) |
Style | Style of the cell being drawn (This value is assigned by the application using the TypeOwnerDrawStyle property.) |
Remarks
Use the SheetSendingEvent property if you want to return the sheet for which this event occured.
See Also
SheetSendingEvent, TypeOwnerDrawStyle properties