Oracle Spread Table Help

The Oracle spread table is a multi-functional grid control.

Properties

Methods

Events

Objects

Column Object

Row Object

Cell Object

Column Axis Object

Row Axis Object

Other

Appendix A

Aggregation

Property Pages


No Help Available

No help is available for this area of the window.


No Help Available

No help is available for this message box.

<< If you wish to author help specific to each message box prompt, then remove the AFX_HIDP_xxx values from the [ALIAS] section of your .HPJ file, and author a topic for each AFX_HIDP_xxx value.  For example, AFX_HIDP_INVALID_FILENAME is the help topic for the Invalid Filename message box. >>


Oracle Spread Table Property Pages

General Property Page

Special Property Page

Display Property Page

User Actions Property Page

Pop Up Menus Propery Page

Header and Grid Property Page

Labels Property Page

Colors Property Page

Fonts Property Page


General Property Page

TableType	short	default: MMTX_SPREAD

Indicates the type of the table.  See Appendix A: Table Types for values.

Direction	short	default: MMTX_LEFT

Indicates the direction of the table, for BiDi support.  See Appendix A: Directions for values.

SubRowDisplayType 	short	default: MMTX_NORMAL

Indicates the way that subrows are drawn.  See Appendix A:Sub Row Types for values.

ColumnEventType	short	default: MMTX_BYNAME

Indicates the type of event sent for columns.  See Appendix A: Event Types for values.

RowEventType	short	default: MMTX_BYNAME

Indicates the type of event sent for rows.  See Appendix A: Event Types for values.

CellEventType	short	default: MMTX_BYNAME_BYNAME

Indicates the type of event sent for cells.  See Appendix A: Cell Event Types for values.

DimensionName	BSTR	default: “   “

Indicates the name of the current dimension of data.


Special Property Page

IsVirtualTable	BOOL	default: FALSE

Determines whether the table stores all the data in the table or only the data that is currently

visible on the screen.  If IsVirtualTable is TRUE then the control will send one of the

NeedRowData events to the container anytime the control needs more data.  When a row is no

longer visible on the screen the control will erase its data.

IsDynamicTable	BOOL	default: FALSE

Determines whether the table automatically adds new columns and rows depending on the size of

the control.  If IsDynamicTable is TRUE then the table will add new columns and rows if the

controls size is changed.

IsBound	BOOL	default: FALSE

Determines if the table can connect to an Oracle database.  Set IsBound to TRUE

to use the table methods, Connect, Query, and Disconnect.

UseRowIndexAsRowName	BOOL	default: FALSE

Determines if the row’s name will be set to the row’s initial index.

UseColumnIndexAsColumnName	BOOL	default: FALSE

Determines if the column’s name will be set to the column’s initial index.

HasDrawFunction	BOOL	default: FALSE

Indicates whether every cell in the table has a draw function.  If so an owner draw event

will be sent when a cell needs to be redrawn.

RightClickChangeSelection	BOOL	default:	TRUE

Determines if a right click changes the currently selected row/column/cell to the

row/column/cell that was clicked with the right mouse button.

RequireASelection	BOOL	default:	TRUE

Detemines if a selection of a row/column/cell is required at all times in the table. 	If

true the table selects the first row as the default.


Display Property Page

DisplayColumnNames	BOOL	default: TRUE

Indicates whether the column names should be displayed.

DisplayRowNames	BOOL	default: TRUE

Indicates whether the row names should be displayed.

DisplayTableName 	BOOL	default: FALSE

Indicates whether the table name should be displayed.

DisplayExtraColumns	BOOL	default: FALSE

Indicates whether extra columns will be draw to fill the unused space in the table.

DisplayExtraRows	BOOL	default: FALSE

Indicates whether extra rows will be draw to fill the unused space in the table.

DisplayBorder	BOOL	default: TRUE

Indicates whether a rectangle will be drawn around the control.

DisplayTableSummaryArea	BOOL	default: FALSE

Indicates whether the table summary area will be displayed at the bottom left of the table.

DisplayDimensionArea	BOOL	default: FALSE

Indicates whether the dimension area will be displayed at the bottom left of the

table.

DisplayHorizontalScroll Bar	BOOL	default: TRUE

Indicates whether the horizontal scrollbar should be displayed when some columns are not

visible.

DisplayVerticalScrollBar	BOOL	default: TRUE

Indicates whether the vertical scrollbar should be displayed when some rows are not visible.

DisplayCurrentRowIndicator	BOOL	default: FALSE

Indicates whether a bitmap will be displayed to indicate the current row.

DisplayCurrentRowFlat	BOOL	default: TRUE

Determines whether the current row’s indicator will be drawn flat.


User Actions Property Page

AllowUserSelectColumns 	BOOL	default: TRUE

Indicates whether the user can select one column by clicking on the column indicator.

AllowUserSelectMultipleColumns	BOOL	default: FALSE

Should the user be allowed to select more than one column.

AllowUserSelectRows	BOOL	default: TRUE

Indicates whether the user can select one row by clicking on the row indicator.

AllowUserSelectMultipleRows	BOOL	default: FALSE

Should the user be allowed to select more than one row.

AllowUserSelectCells	BOOL	default: TRUE

Indicates whether the user can select one cell by clicking on a cell.

AllowUserSelectMultipleCells	BOOL	default: FALSE

Should the user be allowed to select more than one cell.

AllowUserMoveColumns 	BOOL	default: TRUE

Indicates whether the user can interactively move columns.

AllowUserMoveRows	BOOL	default: FALSE

Determines if the user can move row’s around with the mouse.

AllowUserMoveRowsWithKeyboard	BOOL	default: FALSE

Determines if the user can move row’s around with the keyboard.  <CTRL><UPARROW> moves

the row up.  <CTRL><DOWNARROW> move the row down.

AllowUserAddNewRowWithKeyboard	BOOL	default: FALSE

Determines if the user can add rows with the keyboard.  <INSERT> adds rows at the end of the

table.  <CTRL><+> adds rows before the current row.

AllowUserNavigateWithKeyboard	BOOL	default: TRUE

Determines if the user can navigate between cells using the keyboard.

AllowUserResizeRows 	BOOL	default: TRUE

Indicates whether the user can interactively resize rows.

AllowUserResizeColumns 	BOOL	default: TRUE

Indicates whether the user can interactively resize columns.

AllowUserResizeHeaderArea	BOOL	default: FALSE

Indicates whether the user can interactively resize the table name area.

AllowUserResizeRowArea 	BOOL	default: FALSE

Indicates whether the user can interactively resize the row indicator area.

AllowUserResizeColumnArea 	BOOL	default: FALSE

Indicates whether the user can interactively resize the column indicator area.

AllowImmediateEdit	BOOL	default: TRUE

Determines if the user can immediately begin editing on the currently selected cell.  If

AllowImmediateEdit is FALSE the user must either double click in the cell or push the space bar

before editing begins.

AllowUserEditCells 	BOOL	default: TRUE

Indicates whether the user can interactively edit cells.


Labels Property Page

ColumnIndicatorJustification 	short	        default: MMTX_CENTER | MMTX_MIDDLE

Indicates the justification for column names.  See Appendix A:Justification for values.

ColumnIndicatorHeight 	short	default: 20 pixels

Indicates the height of the column indicators.

ColumnAxisHeight	short	default: 16 pixels

Indicates the height of the column axis when the TableType is MMTX_PIVOT.

RowIndicatorJustification 	short	default:MMTX_START | MMTX_MIDDLE

Indicates the justification for row names.  Appendix A:Justification for values.

RowIndicatorWidth 	short	default: 32 pixels

Indicates the width of the row indicators.

RowAxisWidth	short	default: 16 pixels

Indicates the width of the row axis when the TableType is MMTX_PIVOT.

LabelDisplayType 	short	default: MMTX_SHADOW

Indicates the way the labels are drawn.  See Appendix A:Label Types for possible values.


Header and Grid Property Page

TableName	BSTR	default: “”

The name displayed at the top of the table.

TableNameJustification	short	default: MMTX_START | MMTX_TOP

Indicates the justication of the header area.  See Appendix A:Justification for possible values.

TableNameHeight	short	default: 20 pixels

The height of the header area.

Justification	short	default: MMTX_START | MMTX_TOP

Indicates the justication of the data in every cell. See Appendix A:Justification for possible

values.

HorizontalGridType	short	default: MMTX_SOLID

Indicates the type of grid displayed.  See Appendix A:Grid Types for values.

VerticalGridType	short	default: MMTX_SOLID

Indicates the type of grid displayed. See Appendix A:Grid Types for values.


Pop Up Menus Property Page

AllowPopupMenus	BOOL	default: TRUE

Indicates whether a pop-up menu will be displayed when the user clicks the right mouse button.

AllowUserAddColumns	BOOL	default: FALSE

Indicates whether the pop-up menu will contain an entry to allow the user to add columns.

AllowUserDeleteColumns	BOOL	default: FALSE

Indicates whether the pop-up menu will contain an entry to allow the user to delete columns.

AllowUserHideColumns	BOOL	default: FALSE

Indicates whether the pop-up menu will contain an entry to allow the user to hide columns.

AllowUserPinColumns	BOOL	default: FALSE

Indicates whether the pop-up menu will contain an entry to allow the user to pin a column to the

left side of the table so that the column is not affected by scrolling.

AllowUserCombineColumns	BOOL	default: FALSE

Indicates whether the user can combine multiple columns into one column.

AllowUserAddRows	BOOL	default: FALSE

Determines if the user can add rows with a menu item.

DisplayCutMenu	BOOL	default: TRUE

Determines whether the cut menu item will be displayed when the

user clicks in the table with the right mouse button.

DisplayCopyMenu	BOOL	default: TRUE

Determines whether the copy menu item will be displayed when the

user clicks in the table with the right mouse button.

AllowUserHideRows 	BOOL	default: FALSE

Indicates whether the user can hide rows.

AllowUserExpandColumns 	BOOL	default: FALSE

Indicates whether the user can expand/collapse columns with sub columns.

AllowUserExpandRows	BOOL	default: FALSE

Indicates whether the user can expand/collapse rows with sub rows.

AllowUserChangeColumnProperties	BOOL	default: FALSE

Indicates whether the pop-up menu will contain an entry to allow the user to change the display

characteristics of a column.  Characteristics include  name, width, forecolor, backcolor,

justification, and font.

AllowUserChangeRowProperties	BOOL	default: FALSE

Indicates whether the pop-up menu will contain an entry to allow the user to change the display

characteristics of a row.  Characteristics include  name, width, forecolor, backcolor, justification,

and font.

AllowUserChangeCellProperties	BOOL	default: FALSE

Indicates whether the pop-up menu will contain an entry to allow the user to change the display

characteristics of a cell.  Characteristics include width, height, forecolor, backcolor, justification,

and font.

DisplayPasteMenu	BOOL	default: TRUE

Determines whether the paste menu item will be displayed when the

user clicks in the table with the right mouse button.

DisplayClearMenu	BOOL	default: TRUE

Determines whether the clear menu item will be displayed when the

user clicks in the table with the right mouse button.


Colors Property Page

BackColor	OLE_COLOR	default: white

The background color of the table.

BorderColor	OLE_COLOR	default: black

Indicates the color to draw around the outside of the control.

ForeColor	OLE_COLOR	default: black

The foreground color of the table.

HorizontalGridColor 	OLE_COLOR	default: black

Indicates the color of the horizontal grid.

LabelBackColor 	OLE_COLOR	default: COLOR_BTNFACE

Indicates the background color of the row and column indicator names.

LabelForeColor	OLE_COLOR	default: COLOR_BTNTEXT

Indicates the foreground color of the row and column indicator names.

SelectColor	OLE_COLOR	default: black

The color that designates a selected row, column, or cell.

SelectTextColor 	OLE_COLOR	default: white

Indicates the color of the text that has been selected.

TableNameBackColor	OLE_COLOR	default: COLOR_BTNFACE

The background color of the header area.

TableNameForeColor	OLE_COLOR	default: COLOR_BTNTEXT

The foreground color of the header area.

VerticalGridColor 	OLE_COLOR	default: black

Indicates the color of the vertical grid.


Fonts Property Page

Font	LPFONTDISP	default: 8 pt MS Sans Serif

The font for every cell in the table.

LabelFont 	LPFONTDISP	default: 8 pt. bold, MS Sans Serif

Indicates the font of the row and column indicator names.

TableNameFont 	LPFONTDISP	default: 8 pt, bold, MS Sans Serif

The font for the header area.


Oracle Spread Table Properties

General Properties

TableType	short	default: MMTX_SPREAD

Indicates the type of the table.  See Appendix A: Table Types for values.

Direction	short	default: MMTX_LEFT

Indicates the direction of the table, for BiDi support.  See Appendix A: Directions for values.

ColumnEventType	short	default: MMTX_BYNAME

Indicates the type of event sent for columns.  See Appendix A: Event Types for values.

RowEventType	short	default: MMTX_BYNAME

Indicates the type of event sent for rows.  See Appendix A: Event Types for values.

CellEventType	short	default: MMTX_BYNAME_BYNAME

Indicates the type of event sent for cells.  See Appendix A: Cell Event Types for values.

ColumnCount	long	default: 0

Indicates the current number of columns in the table.  This is read only.

RowCount	long	default: 0

Indicates the current number of rows in the table. This is read only.

CurrentColumn	long	default: 0

A zero-based index that indicates the column that has the last user input such as a mouse down.

CurrentRow	long	default: 0

A zero-based index that indicates the row that has the last user input such as a mouse down.

Table UI Properties

BackColor	OLE_COLOR	default: white

The background color of the table.

ForeColor	OLE_COLOR	default: black

The foreground color of the table.

Font	LPFONTDISP	default: 8 pt MS Sans Serif

The font for every cell in the table.

Justification	short	default: MMTX_START | MMTX_TOP

Indicates the justication of the data in every cell. See Appendix A:Justification for possible

values.

BackPattern 	OLE_HANDLE	default: None

Indicates the background pattern of the table.  BackPattern should be an HBRUSH.

BorderColor	OLE_COLOR	default: black

Indicates the color to draw around the outside of the control.

SelectColor	OLE_COLOR	default: COLOR_HIGHLIGHT

The color that designates a selected row, column, or cell.

SelectTextColor  	OLE_COLOR	default: COLOR_HIGHLIGHTTEXT

Indicates the color of the text that has been selected.

Display Properties

DisplayTableName	BOOL	default: FALSE

Indicates whether the table name should be displayed.

DisplayColumnNames	BOOL	default: TRUE

Indicates whether the column names should be displayed.

DisplayRowNames	BOOL	default: TRUE

Indicates whether the row names should be displayed.

DisplayHorizontalScroll Bar	BOOL	default: TRUE

Indicates whether the horizontal scrollbar should be displayed when some columns are not

visible.

DisplayVerticalScrollBar	BOOL	default: TRUE

Indicates whether the vertical scrollbar should be displayed when some rows are not visible.

DisplayCurrentRowIndicator	BOOL	default: FALSE

Indicates whether a bitmap will be displayed to indicate the current row.

DisplayCurrentRowFlat	BOOL	default: TRUE

Determines whether the current row’s indicator will be drawn flat.

DisplayTableSummaryArea	BOOL	default: FALSE

Indicates whether the table summary area will be displayed at the bottom left of the table.

DisplayDimensionArea	BOOL	default: FALSE

Indicates whether the dimension area will be displayed at the bottom left of the

table.

DisplayExtraColumns	BOOL	default: FALSE

Indicates whether extra columns will be draw to fill the unused space in the table.

DisplayExtraRows	BOOL	default: FALSE

Indicates whether extra rows will be draw to fill the unused space in the table.

DisplayBorder	BOOL	default: TRUE

Indicates whether a rectangle will be drawn around the control.

User Action Properties

AllowUserSelectColumns 	BOOL	default: TRUE

Indicates whether the user can select one column by clicking on the column indicator.

AllowUserSelectMultipleColumns	BOOL	default: FALSE

Should the user be allowed to select more than one column.

AllowUserSelectRows	BOOL	default: TRUE

Indicates whether the user can select one row by clicking on the row indicator.

AllowUserSelectMultipleRows	BOOL	default: FALSE

Should the user be allowed to select more than one row.

AllowUserSelectCells	BOOL	default: TRUE

Indicates whether the user can select one cell by clicking on a cell.

AllowUserSelectMultipleCells	BOOL	default: FALSE

Should the user be allowed to select more than one cell.

AllowUserResizeHeaderArea	BOOL	default: FALSE

Indicates whether the user can interactively resize the table name area.

AllowUserResizeColumnArea 	BOOL	default: FALSE

Indicates whether the user can interactively resize the column indicator area.

AllowUserResizeRowArea 	BOOL	default: FALSE

Indicates whether the user can interactively resize the row indicator area.

AllowUserResizeRows 	BOOL	default: FALSE

Indicates whether the user can interactively resize rows.

AllowUserResizeColumns 	BOOL	default: TRUE

Indicates whether the user can interactively resize columns.

AllowUserMoveColumns 	BOOL	default: TRUE

Indicates whether the user can interactively move columns.

AllowUserEditCells 	BOOL	default: TRUE

Indicates whether the user can interactively edit cells.

AllowUserMoveRows	BOOL	default: FALSE

Determines if the user can move row’s around with the mouse.

AllowUserMoveRowsWithKeyboard	BOOL	default: FALSE

Determines if the user can move row’s around with the keyboard.  <CTRL><UPARROW> moves

the row up.  <CTRL><DOWNARROW> move the row down.

AllowUserAddNewRowWithKeyboard	BOOL	default: FALSE

Determines if the user can add rows with the keyboard.  <INSERT> adds rows at the end of the

table.  <CTRL><+> adds rows before the current row.

AllowUserNavigateWithKeyboard	BOOL	default: FALSE

Determines if the user can navigate between cells using the keyboard.

AllowImmediateEdit	BOOL	default: TRUE

Determines if the user can immediately begin editing on the currently selected cell.  If

AllowImmediateEdit is FALSE the user must either double click in the cell or push the space bar

before editing begins.

Pop-up Menu Properties

AllowPopupMenus	BOOL	default: TRUE

Indicates whether a pop-up menu will be displayed when the user clicks the right mouse button.

AllowUserPinColumns	BOOL	default: FALSE

Indicates whether the pop-up menu will contain an entry to allow the user to pin a column to the

left side of the table so that the column is not affected by scrolling.

AllowUserDeleteColumns	BOOL	default: FALSE

Indicates whether the pop-up menu will contain an entry to allow the user to delete columns.

AllowUserAddColumns	BOOL	default: FALSE

Indicates whether the pop-up menu will contain an entry to allow the user to add columns.

AllowUserHideColumns	BOOL	default: FALSE

Indicates whether the pop-up menu will contain an entry to allow the user to hide columns.

AllowUserChangeColumnProperties	BOOL	default: FALSE

Indicates whether the pop-up menu will contain an entry to allow the user to change the display

characteristics of a column.  Characteristics include  name, 	width, forecolor, backcolor,

justification, and font.

AllowUserChangeRowProperties	BOOL	default: FALSE

Indicates whether the pop-up menu will contain an entry to allow the user to change the display

characteristics of a row.  Characteristics include  name, width, forecolor, backcolor, justification,

and font.

AllowUserChangeCellProperties	BOOL	default: FALSE

Indicates whether the pop-up menu will contain an entry to allow the user to change the display

characteristics of a cell.  Characteristics include width, height, forecolor, backcolor, justification,

and font.

AllowUserCombineColumns	BOOL	default: FALSE

Indicates whether the user can combine multiple columns into one column.

AllowUserHideRows 	BOOL	default: FALSE

Indicates whether the user can hide rows.

AllowUserExpandColumns 	BOOL	default: FALSE

Indicates whether the user can expand/collapse columns with sub columns.

AllowUserExpandRows 	BOOL	default: FALSE

Indicates whether the user can expand/collapse rows with sub rows.

AllowUserAddRows	BOOL	default: FALSE

Determines if the user can add rows with a menu item.

DisplayCopyMenu	BOOL	default: TRUE

Determines whether the copy menu item will be displayed when the

user clicks in the table with the right mouse button.

DisplayPasteMenu	BOOL	default: TRUE

Determines whether the paste menu item will be displayed when the

user clicks in the table with the right mouse button.

DisplayCutMenu	BOOL	default: TRUE

Determines whether the cut menu item will be displayed when the

user clicks in the table with the right mouse button.

DisplayClearMenu	BOOL	default: TRUE

Determines whether the clear menu item will be displayed when the

user clicks in the table with the right mouse button.

Header Properties

TableName	BSTR	default: “”

The name displayed at the top of the table.

TableNameJustification	short	default: MMTX_START | MMTX_TOP

Indicates the justication of the header area.  See Appendix A:Justification for possible values.

TableNameForeColor	OLE_COLOR	default: COLOR_BTNTEXT

The foreground color of the header area.

TableNameBackColor	OLE_COLOR	default: COLOR_BTNFACE

The background color of the header area.

TableNameFont	LPFONTDISP	default: 8 pt, bold, MS Sans Serif

The font for the header area.

TableNameHeight	short	default: 20 pixels

The height of the header area.

TableNameBackPattern 	OLE_HANDLE	default: None

Indicates the background pattern of the header area. TableNameBackPattern should be set to an

HBRUSH.

Label Properties

LabelForeColor 	OLE_COLOR	default: COLOR_BTNTEXT

Indicates the foreground color of the row and column indicator names.

LabelBackColor 	OLE_COLOR	default: COLOR_BTNFACE

Indicates the background color of the row and column indicator names.

LabelFont 	LPFONTDISP	default: 8 pt. bold, MS Sans Serif

Indicates the font of the row and column indicator names.

LabelBackPattern 	OLE_HANDLE	default: 0

Indicates the background pattern of the row and column indicator names.  	LabelBackPattern

should be set to an HBRUSH.

LabelDisplayType 	short	default: MMTX_SHADOW

Indicates the way the labels are drawn.  See Appendix A:Label Types for possible values.

Indicator Properties

RowIndicatorWidth 	short	default: 32 pixels

Indicates the width of the row indicators.

RowIndicatorJustification 	short	default:MMTX_START | MMTX_MIDDLE

Indicates the justification for row names.  Appendix A:Justification for values.

ColumnIndicatorHeight 	short	default: 20 pixels

Indicates the height of the column indicators.

ColumnIndicatorJustification 	short	        default: MMTX_CENTER | MMTX_MIDDLE

Indicates the justification for column names.  See Appendix A:Justification for values.

SubRowDisplayType 	short	default: MMTX_NORMAL

Indicates the way that subrows are drawn.  See Appendix A:Sub Row Types for values.

Grid Properties

HorizontalGridType	short	default: MMTX_SOLID

Indicates the type of grid displayed.  See Appendix A:Grid Types for values.

HorizontalGridColor 	OLE_COLOR	default: black

Indicates the color of the horizontal grid.

VerticalGridType	short	default: MMTX_SOLID

Indicates the type of grid displayed. See Appendix A:Grid Types for values.

VerticalGridColor 	OLE_COLOR	default: black

Indicates the color of the vertical grid.

Dimension Properties

DimensionName	BSTR	default: “   “

Indicates the name of the current dimension of data.

DimensionCount	short	default: 1

Indicates the number of  dimensions in the table. This is read only.

CurrentDimension	short	default: 0

A zero-based index that indicates the current dimension that is displayed.

Pivot Table Properties

ColumnAxisHeight	short	default: 16 pixels

Indicates the height of the column axis when the TableType is MMTX_PIVOT.

RowAxisWidth	short	default: 16 pixels

Indicates the width of the row axis when the TableType is MMTX_PIVOT.

Other Properties

HasDrawFunction	BOOL	default: FALSE

Indicates whether every cell in the table has a draw function.  If so an owner draw event

will be sent when a cell needs to be redrawn.

OwnerDrawData	BSTR	default: N/A

A write-only property that should only be used when an OwnerDraw event is received.  Useful if

the container wants to keep only one copy of data but still allow the table to draw each cell.  The

OCX will send an OwnerDraw event to the container.  The container can then set

OwnerDrawData.  If OwnerDrawData is set the OCX will draw that cell with the string in

 	OwnerDrawData.

AllowEdit	BOOL	default: TRUE

Used in conjunction with the PreCellEdit events.  When the PreCellEdit event is received,

the container can disallow the edit operation to take place by setting AllowEdit to FALSE.

ProcessEvent	BOOL	default: TRUE

ProcessEvent is a very powerful property that lets the container cancel or approve

any user action.  After the table sends an event, such as keydown, column click,

row resize, etc, it will check the value of ProcessEvent.  If the container sets

ProcessEvent to FALSE in its event handler, the table will not process the event.

In effect the container can cancel any user action, or process the action any way

it wants.

IsBound	BOOL	default: FALSE

Determines if the table can connect to an Oracle database.  Set IsBound to TRUE

to use the table methods, Connect, Query, and Disconnect.

IsVirtualTable	BOOL	default: FALSE

Determines whether the table stores all the data in the table or only the data that is currently

visible on the screen.  If IsVirtualTable is TRUE then the control will send one of the

NeedRowData events to the container anytime the control needs more data.  When a row is no

longer visible on the screen the control will erase its data.

IsDynamicTable	BOOL	default: FALSE

Determines whether the table automatically adds new columns and rows depending on the size of

the control.  If IsDynamicTable is TRUE then the table will add new columns and rows if the

controls size is changed.

UseRowIndexAsRowName	BOOL	default: FALSE

Determines if the row’s name will be set to the row’s initial index.

UseColumnIndexAsColumnName	BOOL	default: FALSE

Determines if the column’s name will be set to the column’s initial index.

RightClickChangeSelection	BOOL	default:	TRUE

Determines if a right click changes the currently selected row/column/cell to the

row/column/cell that was clicked with the right mouse button.

RequireASelection	BOOL	default:	TRUE

Detemines if a selection of a row/column/cell is required at all times in the table. 	If

true the table selects the first row as the default.


Oracle Spread Table Methods

Table Creation Methods

void CreateTable(long numberColumns, VARIANT columnNameArray, VARIANT columnSizeArray,

     long numberRows,      VARIANT rowNameArray,       VARIANT rowSizeArray);

Create a table with numberColumns columns and numberRows rows.  columnNameArray and

rowNameArray are an array of BSTRs if columnNames or rowNames are required.  In this

case the type of the VARIANT should be VT_ARRAY | VT_BSTR.  If no names are required,

 	the type of the VARIANT should be VT_EMPTY.  columnSizeArray and rowSizeArray are

arrays of longs.  Each element in the array represent the size of a column or row in pixels.  If the

container wants to set the size, the type of the VARIANT should be VT_ARRAY | VT_I4.  If the

container wants the size to be the default size, the type of the array should be VT_EMPTY.

void NewColumn(BSTR* columnName, BSTR* beforeWhich);

Add a new column named columnName, before the column named beforeWhich. 	If

beforeWhich is NULL, add the column at the end.

void NewColumnByColNum(long columnIndex);

Insert a new column at the zero based position columnIndex.

void NewRow(BSTR* rowName, BSTR* beforeWhich);

Add a new row named rowName, before the row named beforeWhich.  If  beforeWhich is

NULL, add the row at the end.

void NewRowByRowNum(long rowNum);

Insert a new row at the zero based position rowNum.

void AddCustomMenu(BSTR* menuName, short menuID);

Add a menu item to the menus that are displayed when the user clicks with the

right mouse button.

void AddDimension(BSTR* dimensionName, short position);

Add another dimension of data.  To set the data for a given dimension change the

 	CurrentDimension property to the correct dimension and then set the cell objects

text with the data.

Table Access Methods

LPDISPATCH  GetColumnByObjectData(long objectdata);

Get a handle to a column object, using the column’s object data property, to access the column’s

properties/methods.

LPDISPATCH GetRowByObjectData(long objectdata);

Get a handle to a row object, using the row’s object data property, to access the row’s

properties/methods.

LPDISPATCH GetCellByObjectData(long objectdata);

Get a handle to a cell object, using the cell’s object data property, to access the cell’s

properties/methods.

LPDISPATCH GetColumnByName(BSTR* columnName);

LPDISPATCH GetColumnByIndex(long columnIndex);

Get a handle to a column object to access the column’s properties/methods.

LPDISPATCH GetRowByName(BSTR* rowName);

LPDISPATCH GetRowByIndex(long rowIndex);

Get a handle to a row object to access the row’s properties/methods.

LPDISPATCH GetCellByColNameRowName(BSTR* columnName, BSTR* rowName);

LPDISPATCH GetCellByColNameRowIndex(BSTR* columnName, long rowIndex);

LPDISPATCH GetCellByColIndexRowName(long columnIndex, BSTR* rowName);

LPDISPATCH GetCellByColIndexRowIndex(long columnIndex, long rowIndex);

Get a handle to a cell object to access the cell’s properties/methods.

Table Deletion Methods

void DeleteAllColumns();

Deletes all the columns in the table.

void DeleteAllRows();

Deletes all the rows in the table.

void DeleteAllCustomMenus();

Delete all the custom menus that have been added with AddCustomMenu.

void RemoveCustomMenu(short menuID);

Remove a menu item added with AddCustomMenu.

void RemoveDimension(BSTR* dimensionName);

Remove a dimension of data.

Selection Methods

void ClearSelect();

Clear the list of selected objects.

void AddSelectColumn(LPDISPATCH column);

Add the column object to the list of selected columns.

void RemoveSelectColumn(LPDISPATCH columnName);

Remove the column object from the list of selected columns.

void AddSelectRow(LPDISPATCH rowName);

Add the row object to the list of selected rows.

void RemoveSelectRow(LPDISPATCH rowName);

Remove the row object from the list of selected rows.

void AddSelectCell(LPDISPATCH cell);

Add the cell object to the list of selected cells.

void RemoveSelectCell(LPDISPATCH cell);

Remove the cell object from the list of selected cells.

LPDISPATCH CombineSelectedColumns();

Combine the columns that are currently selected into one new column.  The new

name of the column will be, “col 1^col 2^...^col n”.  To access one of the columns

in a combined column use a period.  For example, “col 1^col 2^...^col n.col m”.

The function returns a pointer to the new object.

void SelectAll();

Select all columns.

Note that only one type of object can be selected at a time.  For instance you cannot call AddSelectColumn() and then AddSelectRow(). But you can call AddSelectColumn() multiple times.

long GetRowSelectedCount();

Get the number of currently selected rows.

long GetColumnSelectedCount();

Get the number of currently selected columns.

VARIANT GetSelectedRowsByIndex();

Returns an array of longs that indicate the current rows that are selected.  Each long is a row index.

The type of the VARIANT is VT_ARRAY | VT_I4;

VARIANT GetSelectedRowsByName();

Returns an array of strings that indicate the current rows that are selected.  Each string is a row

name.  The type of the VARIANT is VT_ARRAY | VT_BSTR;

VARIANT GetSelectedColumnsByIndex();

Returns an array of longs that indicate the current columns that are selected.  Each long is a column

index.  The type of the VARIANT is VT_ARRAY | VT_I4;

VARIANT GetSelectedRowsByName();

Returns an array of strings that indicate the current columns that are selected.  Each string is a

column name.  The type of the VARIANT is VT_ARRAY | VT_BSTR;

Edit Methods

void Cut();

Copy the data from the list of selected objects to the clipboard, and clear the data 	from the list of

selected objects.

void Copy();

Copy the data from the list of selected objects to the clipboard.

void Paste();

Paste data from the clipboard onto the list of selected objects.

void Clear();

Clear the data from the list of selected objects.

void MoveSelection(LPDISPATCH column, LPDISPATCH row);

Move the selected objects to before column, row. If the selected objects are

columns, move the selected objects before columnName.  Note that at this point,

only columns can be moved.

void EndEdit();

Ends a cell edit if any are happening.

Display Methods

long GetFirstDisplayedRowIndex();

BSTR GetFirstDisplayedRowName();

Get the index or the name of the row that is current displayed first on the screen.

long GetFirstDisplayedColumnIndex();

BSTR GetFirstDisplayedColumnName();

Get the index or the name of column that is current displayed first on the screen.

void SetFirstDisplayedColumnByIndex(long columnIndex);

void SetFirstDisplayedColumnByName(BSTR* columnName);

Set the column that is displayed first on the screen by index or name.

void SetFirstDisplayedRowByIndex(long rowIndex);

void SetFirstDisplayedRowByName(BSTR* rowName);

 	Set the row that is displayed first on the screen by index or name.

Database Methods

SCODE Connect(BSTR* database, BSTR* user, BSTR* password, long options);

Connect to the given database as the given user.  options determines

the type of database connection.  See Appendix A: Database Connection Types

for more information.  If the connection fails, Connect will return S_FALSE.

void Disconnect();

Disconnect from the database and clear the query.

SCODE Query(BSTR* querystring, long options);

Query the open database with the given querystring.  Connect must be called

first and must successfully open a database.  options determines the type

of the query.  See Appendix A: Query Types for more information.  If the query

fails, Query will return S_FALSE.

Pivot Table Specific Methods

Creation Methods

void AddColumnAxis(BSTR* axisName, VARIANT nameArray);

Add a column axis to the pivot table. nameArray is an array of BSTRs.  The type of the

VARIANT should be VT_ARRAY | VT_BSTR.  An axis is equivalent to a list of sub columns in

a spread table.

void AddRowAxis(BSTR* axisName, VARIANT nameArray);

Add a row axis to the pivot table. nameArray is an array of BSTRs.  The type of the

VARIANT should be VT_ARRAY | VT_BSTR.  An axis is equivalent to a list of sub columns in

a spread table.

Deletion Methods

void DeleteAllColumnAxis();

Delete all of the column axis’ that have been created.

void DeleteAllRowAxis();

Delete all of the row axis’ that have been created.

Access Methods

LPDISPATCH GetColumnAxisByName(BSTR* axisName);

LPDISPATCH GetColumnAxisByIndex(short axisIndex);

Get a handle to a column axis object by name or index.

LPDISPATCH GetRowAxisByIndex(short axisIndex);

LPDISPATCH GetRowAxisByName(BSTR* axisName);

Get a handle to a row axis object by name or index.

Selection Methods

void SelectColumnAxisHeader(LPDISPATCH columnAxisObject);

void SelectRowAxisHeader(LPDISPATCH rowAxisObject);

Select the columnAxisObject or rowAxisObject.

Other Table Methods

BSTR GetVersion();

Get the a string containing the current version of the control.


Oracle Spread Table Events

Row and column events come in two types.  By name or by index.   Only one of these events will be sent.  The type of event sent depends on the appropriate table property.   If rowEventType is set to MMTX_BYNAME then row events will be sent by row name.  Similarly, if columnEventType is set to MMTX_INDEX then column events will be sent by column index.  Cell events come in four types and the type of event sent is determined by the table property cellEventType.

Most events can be cancelled before the table actually process them, see the table property, ProcessEvent for more information.

Menu Started Events

void MenuBegin();

Sent when a user clicks with the right mouse button.  To disable pop-up menus set

m_allowPopUpMenus = FALSE.

void MenuStartInHeader();

Sent when a user clicks with the right mouse button in the header area.

void MenuStartInTable();

Sent when a user clicks with the right mouse button any where that is not a column, row, or

header area.

void MenuStartInCorner();

Sent when a user clicks with the right mouse button in the area above the row indicators and to

the left of the column indicators.

void MenuStartInColumnByColName(BSTR* columnName);

void MenuStartInColumnByColIndex(long columnIndex);

Sent when user clicks with right mouse button in the column.

void MenuStartInRowByRowName(BSTR* rowName);

void MenuStartInRowByRowIndex(long rowIndex);

Sent when user clicks with right mouse button in the row

void MenuStartInCellByColNameRowName(BSTR* columnName, BSTR* rowName);

void MenuStartInCellByColNameRowIndx(BSTR* columnName, long rowIndex);

void MenuStartInCellByColIndxRowName(long columnIndex, BSTR* rowName);

void MenuStartInCellByColIndxRowIndx(long columnIndex, long rowIndex);

Sent when user clicks with right mouse button in the cell.

void MenuEnd();

Sent when the user is finished with the pop-up menu.

Menu Selected Events

void CustomMenuSelected(short menuID);

Indicates that a custom menu has been selected by the user.

Column Menus

void ColumnDeletedByColIndex(long columnIndex);

void ColumnDeletedByColName(BSTR* columnName);

Sent when user chooses to delete the given column.

void ColumnsCombinedByIndex(VARIANT columnIndexArray);

void ColumnsCombinedByColumnName(VARIANT columnNameArray);

Sent when user chooses to combine the given columns. columnIndexArray is an array of longs

that tells the container what columns were combined.  The VARIANT type of columnIndexArray

is VT_ARRAY | VT_I4. columnNameArray is an array of BSTRs that tells the container what

columns were combined.  The VARIANT type of columnNameArray is

VT_ARRAY | VT_BSTR.

void ColumnsUncombinedByColIndex(long columnIndex);

void ColumnsUncombinedByColName(BSTR* columnName);

Sent when the user chooses to uncombine the given combined column.

void ColumnVisibilityChangedByName(BSTR* columnName, BOOL isVisible);

void ColumnVisibilityChangedByIndex(long columnIndex, BOOL isVisible);

Sent when the user chooses to hide or show the given column.

void ColumnIsPinnedChangedByName(BSTR* columnName, BOOL isPinned);

void ColumnIsPinnedChangedByIndex(long columnIndex, BOOL isPinned);

Sent when the user chooses to pin or unpin the given column to the side of the table.

void ColumnDispSubColChangedByName(BSTR* columnName, BOOL displaySubColumns);

void ColumnDispSubColChangedByIndex(long columnIndex, BOOL displaySubColumns);

Sent when the user chooses to hide or show the given column’s subcolumns.

void ColumnPropMenuSelectedByColName(BSTR* columnName);

void ColumnPropMenuSelectedByIndex(long columnIndex);

Sent when the user chooses to view the given column’s properties.

void AddColumnMenuSelected();

Sent when the user chooses to add a new column.

Row Menus

void RowVisibilityChangedByRowName(BSTR* rowName, BOOL isVisible);

void RowVisibilityChangedByRowIndex(long rowIndex, BOOL isVisible);

Sent when the user chooses to hide or show the given row.

void RowDispSubRowsChangedByName(BSTR* rowName, BOOL displaySubRows);

void RowDispSubRowsChangedByIndex(long rowIndex, BOOL displaySubRows);

Sent when the user chooses to hide or show the given row’s subrows.

void RowPropMenuSelectedByName(BSTR* rowName);

void RowPropMenuSelectedByIndex(long rowIndex);

Sent when the user chooses to view the given row’s properties.

void AddRowMenuSelected();

Sent when the user choses the add row menu item.

Cell Menus

void CellPropMenuByColIndexRowIndex(long columnIndex, long rowIndex);

void CellPropMenuByColIndexRowName(long columnIndex, BSTR* rowName);

void CellPropMenuByColNameRowIndex(BSTR* columnName, long rowIndex);

void CellPropMenuByColNameRowName(BSTR* columnName, BSTR* rowName);

Sent when the user chooses to view the given cell’s properties.

Other Menus

void HeaderPropertiesMenuSelected();

Sent when the user chooses to view the header’s properties.

void TablePropertiesMenuSelected();

Sent when the user chooses to view the table’s properties.

Edit Menus

void Clear(VARIANT columns, VARIANT rows);

Sent when the user chooses the clear menu. columns and rows are

VARIANTS that identify  which cells were involved in the menu choice.  the

type of the variant depends upon  the CellEventType property:

CellEventType = MMTX_BYNAME_BYINDEX:

columns is an array of BSTRs that correspond to the name of

the column.   columns type is VT_ARRAY | VT_BSTR.  rows is an array of longs

that correspond  to the index of the rows.  rows type is VT_ARRAY | VT_I4.

CellEventType = MMTX_BYINDEX_BYNAME:

columns is an array of longs that correspond to the index of

each column.  columns type is VT_ARRAY | VT_I4.  rows is array of BSTRs that

correspond to the name of the rows.  rows type is VT_ARRAY | VT_BSTR.

CellEventType = MMTX_BYNAME_BYNAME:

columns is an array of BSTRs that correspond to the name of

the column.  columns type is VT_ARRAY | VT_BSTR.  rows is array of BSTRs that

correspond to the name of the rows.  rows type is VT_ARRAY | VT_BSTR.

CellEventType = MMTX_BYINDEX_BYINDEX:

columns is an array of longs that correspond to the index of

each column.  columns type is VT_ARRAY | VT_I4.  rows is an array of longs

that correspond to the index of the rows.  rows type is VT_ARRAY | VT_I4.


void Copy(VARIANT columns, VARIANT rows);

Sent when the user chooses the copy menu. columns and rows are

VARIANTS that identify which cells were involved in the menu choice.  the type

of the variant depends upon the CellEventType property.  See: void

Clear(VARIANT columns, VARIANT rows) for an explanation.

void Cut(VARIANT columns, VARIANT rows);

Sent when the user chooses the Cut menu. columns and rows are VARIANTS

that identify which cells were involved in the menu choice.  the type of the

variant depends upon the CellEventType property.  See: void Clear(VARIANT

columns, VARIANT rows) for an explanation.

void Paste(VARIANT columns, VARIANT rows);

Sent when the user chooses the paste menu. columns and rows are

VARIANTS that identify which cells were involved in the menu choice.  the type

of the variant depends upon the CellEventType property.  See: void

Clear(VARIANT columns, VARIANT rows) for an explanation.

Click Events

void ColumnClickByColName(BSTR* columnName);

void ColumnClickByColIndex(long columnIndex);

Sent when the user clicks in the given column.

void ColumnDblClickByColName(BSTR* columnName);

void ColumnDblClickByColIndex(long columnIndex);

Sent when the user double clicks in the given column.

void RowClickByRowName(BSTR* rowName);

void RowClickByRowIndex(long rowIndex);

Sent when the user clicks in the given row.

void RowDblClickByRowName(BSTR* rowName);

void RowDblClickByRowIndex(long rowIndex);

Sent when the user double clicks in the given row.

void CellClickByColNameRowName(BSTR* columnName, BSTR* rowName);

void CellClickByColNameRowIndex(BSTR* columnName, long rowIndex);

void CellClickByColIndexRowName(long columnIndex, BSTR* rowName);

void CellClickByColIndexRowIndex(long columnIndex, long rowIndex);

Sent when the user clicks in the given cell.

void CellDblClickByColNameRowName(BSTR* columnName, BSTR* rowName);

void CellDblClickByColNameRowIndex(BSTR* columnName, long rowIndex);

void CellDblClickByColIndexRowName(long columnIndex, BSTR* rowName);

void CellDblClickByColIndexRowIndex(long columnIndex, long rowIndex);

Sent when the user double clicks in the given cell.

void UserClickInCorner();

void UserDblClickInCorner();

Sent when a user clicks or double clicks in area above the row indicators and to

the left of the column indicators.  This action selects all the columns in the table.

Resize Events

void ColumnResizeStartByColName(BSTR* columnName);

void ColumnResizeStartByColIndex(long columnIndex);

Sent when the user starts to resize the given column.

void ColumnResizeEndByColName(BSTR* columnName, short newWidth);

void ColumnResizeEndByColIndex(long columnIndex, short newWidth);

Sent when the user finishes resizing the given column.  newWidth is the column’s new width.

void RowResizeStartByRowName(BSTR* rowName);

void RowResizeStartByRowIndex(long rowIndex);

Sent when the user starts to resize the given row.

void RowResizeEndByRowName(BSTR* rowName, short newHeight);

void RowResizeEndByRowIndex(long rowIndex, short newHeight);

Sent when the user finishes resizing the given row.  newHeight is the row’s new height.

HeaderAreaResizeStart();

The user has started to resize the header area.

HeaderAreaResizeEnd(long newSize);

The user has finished resizing the header area and its new size is newSize.

RowIndicatorAreaResizeStart();

The user has started to resize the row indicator area.

RowIndicatorAreaResizeEnd(long newSize);

The user has finished resizing the row indicator area and its new size is newSize.

ColumnIndicatorAreaResizeStart();

The user has started to resize the column indicator area.

ColumnIndicatorAreaResizeEnd(long newSize);

The user has finished resizing the column indicator area and its new size is newSize.

Selection Events

void ColumnSelectedByColName(BSTR* columnName);

void ColumnSelectedByColIndex(long columnIndex);

Sent when the user selects the given column.

void RowSelectedByRowName(BSTR* rowName);

void RowSelectedByRowIndex(long rowIndex);

Sent when the user selects the given row.

Move Events

void ColumnMoveByColName(BSTR* columnName, long oldIndex, long newIndex);

void ColumnMoveByColIndex(long oldIndex, long newIndex);

Sent when the user moves the given column from oldIndex to newIndex.

void RowMoveByRowName(BSTR* rowName, long oldIndex, long newIndex);

void RowMoveByRowIndex(long oldIndex, long newIndex);

Sent when the user moves the given row from oldIndex to newIndex.

Row Events

void CurrentRowChangedByRowName(BSTR* rowName);

void CurrentRowChangedByRowIndex(long rowIndex);

Sent when the last user input occurs in the given row.

void NeedRowDataByRowIndex(long rowIndex);

void NeedRowDataByRowName(BSTR* rowName);

Sent when the table property, IsVirtualTable, is TRUE.  The container should set the data for

the given row so that the control can properly display it.

void NewRowAdded(long rowIndex);

Sent when the user adds a new row.

Column Events

void CurrentColumnChangedByColName(BSTR* columnName);

void CurrentColumnChangedByColIndex(long columnIndex);

Sent when the last user input occurs in the given column.

Edit Events

void CellEditStartByColNameRowName(BSTR* columnName, BSTR* rowName);

void CellEditStartByColNameRowIndex(BSTR* columnName, long rowIndex);

void CellEditStartByColIndexRowName(long columnIndex, BSTR* rowName);

void CellEditStartByColIndexRowIndex(long columnIndex, long rowIndex);

Sent when the user starts to edit the given cell.

void PreCellEditByColumnNameRowName(BSTR* columnName, BSTR* rowName, BSTR* newValue);

void PreCellEditByColumnNameRowIndex(BSTR* columnName, long rowIndex, BTR* newValue);

void PreCellEditByColumnIndexRowName(long columnIndex, BSTR* rowName, BSTR* newValue);

void PreCellEditByColIndexRowIndex(long columnIndex, long rowIndex, BSTR*  newValue);

Sent after the user starts to edit a cell, but before the change is drawn.  The control can cancel the 	edit by setting the table property, AllowEdit, to FALSE.

void PostCellEditByColumnNameRowName(BSTR* columnName, BSTR* rowName, BSTR* newValue);

void PostCellEditByColNameRowIndex(BSTR* columnName, long rowIndex, BSTR* newValue);

void PostCellEditByColIndexRowIndex(long columnIndex, long rowIndex, BSTR* newValue);

void PostCellEditByColIndexRowName(long columnIndex, BSTR* rowName, BSTR* newValue);

Sent after the user edits a cell and the change is redrawn.

void CellEditEndByColNameRowName(BSTR* columnName, BSTR* rowName, BSTR* data);

void CellEditEndByColNameRowIndex(BSTR* columnName, long rowIndex, BSTR* data);

void CellEditEndByColIndexRowName(long columnIndex, BSTR* rowName, BSTR* data);

void CellEditEndByColIndexRowIndex(long columnIndex, long rowIndex, BSTR* data);

Sent when the user finishes editing the given cell.  data is the new string in the cell.

Other Cell Events

void KeyDownInTable(long nChar, long nRepCnt, long nFlags);

A key down has occurred in the table.  See the MFC documentation for OnKeyDown for

more information about the arguments.

void NeedCellDataByColNameRowName(BSTR* columnName, BSTR* rowName);

void NeedCellDataByColNameRowIndex(BSTR* columnName, long rowIndex);

void NeedCellDataByColIndexRowName(long columnIndex, BSTR* rowName);

void NeedCellDataByColIndexRowIndex(long columnIndex, long rowIndex);

Sent after the user has finished editing using a container defined editWidget.  The container

should set the cell’s Text value to the proper value.

void OwnerDrawByColNameRowName(	BSTR* columnName, BSTR* rowName, BOOL selected,

OLE_HANDLE hDC, long rectLeft, long rectTop,

long rectRight, long rectBottom);

void OwnerDrawByColNameRowIndex(	BSTR* columnName, long rowIndex, BOOL selected,

OLE_HANDLE hDC, long rectLeft, long rectTop,

long rectRight, long rectBottom);

void OwnerDrawByColIndexRowName(	long columnIndex, BSTR* rowName, BOOL selected,

OLE_HANDLE hDC, long rectLeft, long rectTop,

long rectRight, long rectBottom);

void OwnerDrawByColIndexRowIndex(	long columnIndex, long rowIndex, BOOL selected,

OLE_HANDLE hDC, long rectLeft, long rectTop,

long rectRight, long rectBottom);

Sent when the HasDrawFunction property has been set for the cell.  selected tells the container if

the cell is currently selected by the user.  hDC is a handle to a Windows device context, type

HDC. rectLeft through rectBottom describe the rectangle of the cell.

Pivot Table Events

void ColumnAxisMoveToRowAxis(BSTR* axisName, short oldPosition, short newPosition);

Sent when the user moves a column axis to the row axis.  axisName and oldPosition describe the

old column axis.  newPosition is the new position on the row axis.

void ColumnAxisMoveToColumnAxis(BSTR* axisName, short oldPosition, short newPosition);

Sent when the user moves a column axis to a new position on the column axis.  axisName and

oldPosition describe the column axis.  newPosition is the new position on the column axis.

void RowAxisMoveToColumnAxis(BSTR* axisName, short oldPosition, short newPosition);

Sent when the user moves a row axis to the column axis.  axisName and oldPosition describe the

old row axis.  newPosition is the new position on the column axis.

void RowAxisMoveToRowAxis(BSTR* axisName, short oldPosition, short newPosition);

Sent when the user moves a row axis to a new position on the row axis.  axisName and

oldPosition describe the row axis.  newPosition is the new position on the row axis.

Other Events

void ColumnScroll(long amount);

Sent when the user scrolls the table horizontally.  amount indicates the amount that the user

scrolled.  A positive value means that the first displayed column’s index is bigger than the

previous column and a negative value means that the first displayed column’s index is less than

the previous column.

void RowScroll(long amount);

Sent when the user scrolls the table vertically.  amount indicates the amount that the user

scrolled.  A positive value means that the first displayed row’s index is bigger than the

previous row and a negative value means that the first displayed row’s index is less than

the previous row.

void DimensionChanged(short newDimension);

Indicates that the dimension has changed by a user click.

void HelpKeyPressed();

Sent when the user presses the F1 key.


Column Object

Properties

Position 	long	default:  Not Applicable

Indicates the zero based index of the column in the table.

CanEdit 	BOOL	default: TRUE

Indicates the editability of the column.

Width 	short	default: 72

Indicates the width in pixels of the column.

CanMove 	BOOL	default: TRUE

Indicates whether the column can be moved in the table.

CanResize 	BOOL	default: TRUE

Indicates whether the column can be resized by the user.

Justification 	short	default: Table Justification

Specifies the justification of data in the column. See Appendix A:Justification for values.

IsVisible 	BOOL	default: TRUE

Specifies the visibility of the column.

IsPinned 	BOOL	default: FALSE

Specifies whether the column is pinned to the left side of the table when scrolling.

SubColumnCount 	short	default: 0

Specifies the number of sub columns of the column object. Read only.

DisplaySubColumns 	BOOL	default: TRUE

Specifies whether the column should display its subcolumns

Name 	BSTR	default: Assigned when created

Specifies the name displayed in the column indicator.  The name can be displayed

as more than one line if it contains any ‘\n’ characters.  For example, if the name was

“this is\n a \n multiline \n test.”  then the name would be drawn on four line.  “This is”

is on the first line, “a” is on the second line, “multiline” is the third line, and “test” is

the last line.

ForeColor 	long	default: Table ForeColor

Specifies the forecolor of the text in the column.

BackColor 	long	default: Table BackColor

Specifies the background color of the column.

Font 	LPDISPATCH	default: Table Font

Indicates the font used to draw data in the column.

BackPattern 	long	default: None

Indicates the background pattern used in the column.  This property should be an HBRUSH.

EditWidget 	long	default: Simple Edit Box

Indicates the edit widget to be used in all of the cells of the column. This property should

be an HWND.

IndicatorBitmap 	long	default: None

Specifies a bitmap that will be displayed in the column indicator to the left of the

column name. This property should be an HBITMAP.

HasDrawFunction 	BOOL	default: FALSE

Specifies if the container wants to draw the column’s contents manually.

Direction 	short	default: MMTX_LEFT

Determines the direction of the column for BiDi support.  See Appendix A:Directions for values.

EditControlType	long 	default:MMTX_EDITCONTROL_EDITBOX

Used along with EditControlInformation to determines the type and behavior of the edit control that

is used in the column.  See Appendix A: EditControlTypes for more information.

EditControlInformation	VARIANT      default: VT_EMPTY

Used along with EditControl to determines the type and behavior of the edit control that

is used in the column.  See Appendix A: EditControlTypes for more information.

DataType 	long	default: MMTX_DATATYPE_STRING

Used along with DataTypeInformation to determines the type of data that can be entered into the edit

control that is used in the column.  See Appendix A: DataTypes for more information.

DataTypeInformation	VARIANT      default: VT_EMPTY

Used along with DataType to determines the type of data that can be entered into the edit

control that is used in the column.  See Appendix A: DataTypes for more information.

MaxDataLength	long	default: -1

Determines the maximum data length of each cell in the column.

MinDataLength	long	default: 0

Determines the minimum data length of each cell in the column.  Currently if this property is not

zero, the control will only check to see if a value is entered into the cell and not the actual length.

This property is useful if a value is required in the cell.

ObjectData	long	default: 0

Used by the container that doesn’t want to access columns with either the column name or column

index.  Used in the table object method GetColumnByObjectData.

IsSelected	BOOL	default: FALSE

Determines if the column is currently selected.

Methods

void Delete();

Delete the column and remove it from the table.

void SetWidthByNumChars(short numberChars);

Set the width of the column so that a max of numberChars will fit in the column.

void DeleteSubColumns();

Delete all the sub columns below the column.

void AddSubColumns(VARIANT nameArray);

Add a number of sub column to the column.  The subsequent subcolumn’s names will be the

name of this column followed by a colon followed by the subcolumn name.

“Name:subcolumnname”.  nameArray is an array of BSTRs containing the names of the sub

columns.  The type of the VARIANT must be VT_ARRAY |  VT_BSTR.

LPDISPATCH CombineColumn(LPDISPATCH column2);

Combine the current column with column 2 to create a new column.  The function returns a

pointer to the new column.  The new column’s name will be  “column 1^column 2”.  To access a

column inside a combined column you must use the following syntax:

“column 1^column2.column 1”.

void RemoveColumn(LPDISPATCH columnToRemove);

Remove a column, columnToRemove from the combined column.  The column

that is removed is deleted.  The current column object still exists minus the

column that was removed.

LPDISPATCH AddNewColumn(BSTR* columnName);

Add a new column, columnName to the column object.  The column object can

already be variant or it can be a normal column.  The function returns a pointer to

the new column object.

void SetDataType(long dataType, VARIANT dataTypeInformation);

Sets the column’s data type.  For more information on the possible values please see Appendix A:

DataTypes.

void SetEditControlType(long editControlType, VARIANT editControlInformation);

Sets the column’s edit control type.  For more information on the possible values please see

Appendix A: EditControlTypes.


Row Object

Properties

Position 	long	default: Not Applicable

Indicates the position of the row in the table.

Height 	short	default: 20 pixels.

Indicates the height of the row.

CanResize 	BOOL	default: TRUE

Indicates whether the row can be resized.

CanEdit 	BOOL	default: TRUE

Indicates whether the cells in the row can be edited.

Name 	BSTR	default: Assigned at creation

Indicates the name of the row.  The name can be displayed

as more than one line if it contains any ‘\n’ characters.  For example, if the name was

“this is\n a \n multiline \n test.”  then the name would be drawn on four line.  “This is”

is on the first line, “a” is on the second line, “multiline” is the third line, and “test” is

the last line.

Font 	LPDISPATCH	default: Table Font

Specifies the font to use to draw the data in the row.

ForeColor 	long	default: Table ForeColor

Indicates the foreground color of the row data.

BackColor 	long	default: Table BackColor

Indicates the background color of the row.

Justification 	short	default: Table Justification

Specifies the justification of data in the row. See Appendix A:Justification for possible values.

BackPattern 	long	default: None

Indicates the background pattern used in the row.  This property should be an HBRUSH.

IsVisible 	BOOL	default: TRUE

Specifies the visibility of the row.

IndicatorBitmap 	long	default: None

Specifies a bitmap that will be displayed in the row indicator to the left of the

row name. This property should be an HBITMAP.

IndicatorIndentation 	short	default: 0

Specifies the number of spaces to indent the row name.

SubRowCount 	short	default: 0

Indicates the number of sub rows of the row.  Read Only.

DisplaySubRows 	BOOL	default: TRUE

Specifies whether the sub rows should be displayed.

HasDrawFunction 	BOOL	default: FALSE

Specifies whether the container wants to manually draw all the cells in the row.

CanMove	BOOL	default: TRUE

Determines whether the row can be moved by the user or not.

ObjectData	long	default: 0

Used by the container that doesn’t want to access rows with either the row name or row

index.  Used in the table object method GetRowByObjectData.

IsSelected	BOOL	default: FALSE

Determines if the row is currently selected.

Methods

void Delete();

Delete the row and remove it from the table.

void AddSubRows(VARIANT nameArray);

Add a number of sub rows to the row.  The subsequent sub row’s names will be the

name of this row followed by a colon followed by the subrow name, “Name:subrowname”

nameArray is an array of BSTRs containing the names of the subrows.  The type of the

VARIANT must be VT_ARRAY |  VT_BSTR.

void SetRowData(VARIANT dataArray);

Set the data that is contained in this row. dataArray is an array of BSTRs containing the values

for the cells.  SetRowData starts with the first column and adds data until there is no more data in

dataArray.  The type of the VARIANT must be VT_ARRAY |  VT_BSTR.

void DeleteSubRows();

Delete all sub row of the current row object.


Cell Object

Properties

Text 	BSTR	default: “”

Indicates the text to be drawn in the cell.

ForeColor 	long 	default: Table ForeColor

Indicates the color of text in the cell.

BackColor 	long 	default: Table BackColor

Indicates the background color of the cell.

Font 	LPDISPATCH 	default: Table Font

Indicates the font used in the cell.

CanEdit 	BOOL 	default: TRUE

Indicates whether or not the user can edit the cell.

Justification 	short 	default: Table Justification

Specifies the justification of data in the cell. See Appendix A:Justification for possible values.

BackPattern 	long 	default: None

Indicates the background pattern used in the cell.  This property should be an HBRUSH.

IsUsed 	BOOL 	default: TRUE

Indicates whether the cell contains useful data.  If not the cell is drawn with a gray

crosshatch pattern.

EditWidget 	long 	default: Simple Edit Box

Indicates the edit widget to be used in the cell.  This property should be an HWND.

HasDrawFunction 	BOOL 	default: FALSE

Indicates whether the tableocx container has to redraw the cell.  If so the

OwnerDraw event will be sent to the container.

EditLocation 	short	default: MMTX_INPLACE

Indicates the location where the cell is edited.  See Appendix A: Edit Locations for values.

EditControlType	long 	default:MMTX_EDITCONTROL_EDITBOX

Used along with EditControlInformation to determines the type and behavior of the edit control that

is used in the cell.  See Appendix A: EditControlTypes for more information.

EditControlInformation	VARIANT      default: VT_EMPTY

Used along with EditControl to determines the type and behavior of the edit control that

is used in the cell.  See Appendix A: EditControlTypes for more information.

DataType 	long	default: MMTX_DATATYPE_STRING

Used along with DataTypeInformation to determines the type of data that can be entered into the edit

control that is used in the cell.  See Appendix A: DataTypes for more information.

DataTypeInformation	VARIANT      default: VT_EMPTY

Used along with DataType to determines the type of data that can be entered into the edit

control that is used in the cell.  See Appendix A: DataTypes for more information.

MaxDataLength	long	default: -1

Determines the maximum data length of  data in the cell.

MinDataLength	long	default: 0

Determines the minimum data length of data in the cell.  Currently if this property is not

zero, the control will only check to see if a value is entered into the cell and not the actual length.

This property is useful if a value is required in the cell.

ObjectData	long	default: 0

Used by the container that doesn’t want to access cells with either the cell name or cell

index.  Used in the table object method GetCellByObjectData.

IsSelected	BOOL	default: FALSE

Determines if the cell is currently selected.

Methods

void SetDataType(long dataType, VARIANT dataTypeInformation);

Sets the cell’s data type.  For more information on the possible values please see Appendix A:

DataTypes.

void SetEditControlType(long editControlType, VARIANT editControlInformation);

Sets the cell’s edit control type.  For more information on the possible values please see

Appendix A: EditControlTypes.

void StartEdit();

Create the cell's edit control and set focus to the edit controls window.

void EndEdit();

If the cell contains an active edit control, update the cell's text value and

destroy the edit control.


Column Axis Object

Properties

Name 	BSTR	default: assigned at creation

Indicates the name of the axis object.

Position 	short	default: assigned at creation

Indicates the position of the axis object on the column axis.

IsVisible 	BOOL	default: TRUE

Determines whether the axis is visible or not.

Elements 	VARIANT	default: assigned at creation

Indicates the names of the objects that make up this axis.  Elements is an array of BSTRs and its

type is VT_ARRAY | VT_BSTR.

Methods

void Delete();

Delete the given axis.

void MoveToRowAxis(short position);

Move this axis to the given position on the row axis.


Row Axis Object

Properties

Name 	BSTR	default: assigned at creation

Indicates the name of the axis object.

Position 	short	default: assigned at creation

Indicates the position of the axis object on the row axis.

IsVisible 	BOOL	default: TRUE

Determines whether the axis is visible or not.

Elements 	VARIANT	default: assigned at creation

Indicates the names of the objects that make up this axis.  Elements is an array of BSTRs and its

type is VT_ARRAY | VT_BSTR.

Methods

void Delete();

Delete this axis.

void MoveToColumnAxis(short position);

Move this axis to the given position on the column axis.


Appendix A

Justification

Justfication can be a combination of horizontal and vertical justifications.

Horizontal Justifications

MMTX_LEFT  = 1

Text is aligned the the left of the object.

MMTX_CENTER = 2

Text is aligned in the horizontal center of the object.

MMTX_RIGHT = 4

Text is aligned to the right of the object.

MMTX_START  = 64

MMTX_START is used for BiDi support, if the table direction is

left-to-right MMTX_START maps to MMTX_LEFT.  If the table

direction is right-to-left MMTX_START maps to MMTX_RIGHT.

MMTX_END = 128

MMTX_END is used for BiDi support, if the table direction is left-to

right MMTX_END maps to MMTX_RIGHT.  If the table direction

right-to-left MMTX_END maps to MMTX_LEFT.

Vertical Justification

MMTX_TOP = 8

Text is aligned to the top of the object.

MMTX_MIDDLE = 16

Text is aligned in the vertical middle of the object.

MMTX_BOTTOM = 32

Text is aligned to the bottom of the object.

Grid Types

MMTX_SOLID = 0

The grid is a solid line.

MMTX_DASHED= 1

The grid is a dashed line.

MMTX_DOTTED = 2

The grid is a dotted line.

MMTX_NONE = 3

No grid is drawn.

Label Types

MMTX_SHADOW = 0

The labels are drawn in with a 3 dimensional look.

MMTX_NOSHADOW = 1

An alternative 3 dimensional look.

MMTX_FLAT = 2

A 2 dimensional look.

Sub Row Types

MMTX_NORMAL = 0

Sub Rows are all drawn to the right of the parent row.

MMTX_OUTLINE = 1

Sub Rows are drawn below the parent row.

Event Types

MMTX_BYNAME = 0

Events are sent by object name.

MMTX_BYINDEX = 1

Events are sent by object index.

Cell Event Types

MMTX_BYNAME_BYINDEX = 0

Events are sent by column name and row index.

MMTX_BYINDEX_BYNAME = 1

Events are sent by column index and row name.

MMTX_BYNAME_BYNAME = 2

Events are sent by column name and row name.

MMTX_BYINDEX_BYINDEX = 3

Events are sent by column index and row index.

Directions

MMTX_DIRECTION_LEFT = 0

The table geometry is left-to-right.

MMTX_DIRECTION_RIGHT = 1

The table geometry is right-to-left.

Table Types

MMTX_SPREAD = 0

The table is a normal grid type table.

MMTX_PIVOT = 1

The table is a pivot table in which the user can move entire groups of sub columns and

sub rows around.

Edit Locations

MMTX_INPLACE = 0

The cell is edited in place.

MMTX_DIALOG = 1

The cell is edited in a pop up dialog.

Edit Control Type & Edit Control Information

MMTX_EDITCONTROL_EDITBOX = 1

The edit control is a simple edit box.  editControlInformation should be sent to VT_EMPTY.

MMTX_EDITCONTROL_DROPLIST = 2

The edit control is a drop down list.  editControlInformation should be an array of BSTR

representing the items in the drop list.  The type of editControlInformation must be

VT_ARRAY | VT_BSTR.

MMTX_EDITCONTROL_COMBOBOX = 4

The edit control is a combo box.  editControlInformation should be an array of BSTR

representing the items in the drop list.  The type of editControlInformation must be

VT_ARRAY | VT_BSTR.

MMTX_EDITCONTROL_CHECKBOX = 8

The edit control is a check box.  editControlInformation should be a BSTR representing the

string that will be displayed next to the check box.

MMTX_EDITCONTROL_SORTED  = 128

Used if the container wants the control to sort the list in a drop list or combo box.  To obtain

this functionality use the bitwise or operator along with the required edit control.  For

example, editControltype = MMTX_EDITCONTROL_COMBOBOX |

        MMTX_EDITCONTROL_SORTED.

MMTX_EDITCONTROL_UPPERCASE = 128

Used if the container wants the control to only allow uppercase characters in an editbox or

combobox.  To obtain this functionality use the bitwise or operator along with the required

edit control.  For example, editControltype = MMTX_EDITCONTROL_COMBOBOX  |

        	MMTX_EDITCONTROL_UPPERCASE.

Data Type & Data Type Information

MMTX_DATATYPE_STRING = 1

The data type of the edit control is a string.  All characters are accepted.

MMTX_DATATYPE_ALPHA = 2

The data type of the edit control is a string.  Only alphabetic characters are allowed.

MMTX_DATATYPE_INTEGER = 4

The data type of the edit control is an integer.  Only numbers are allowed.

MMTX_DATATYPE_DECIMAL = 8

The data type of the edit control is a decimal.  Only numbers and one decimal point are

allowed.  Currently not supported.

MMTX_DATATYPE_DATE  = 32

The data type of the edit control is date.  Currently not supported.

MMTX_DATATYPE_TIME  = 64

The data type of the edit control is time.  Currently not supported.

MMTX_DATATYPE_BITMAP=128

The data type of the column is a bitmap.  A default bitmap is displayed in the cell.  To set

your own bitmap for the cell the DataTypeInformation property should be the bitmap.  Its

type should be VT_I4 and you should cast your HBITMAP handle to the long value.

Currently the variant DataTypeInformation is not used.  Its type should be set to VT_EMPTY.

Database Connection Types

MMTX_DATABASE_DEFAULT	0

Accept the default behavior.

MMTX_DATABASE_PARTIAL_INSERT	1

Turn on requerying on insert.

MMTX_DATABASE_EDIT_NOWAIT	2

Turn on no-waiting when editing a cell.

MMTX_DATABASE_NO_REFETCH	4

Let Oracle set default field (column) values as with

MMTX_DATABASE_PARTIAL_INSERT,  but data is not refetched after the

insert or update operation.

MMTX_DATABASE_NONBLOCK	8

Turn on Non Blocking mode on sql statement execution (16-bit only).

Query Types

MMTX_QUERY_DEFAULT	0

Accept the default behavior.

MMTX_QUERY_NOBIND	1

Do not use bindable parameters.

MMTX_QUERY_KEEP_BLANKS	2

Do not strip trailing blanks in values.

MMTX_QUERY_READONLY	4

Make this query nonupdatable.

MMTX_QUERY_NOCACHE	8

Do not make a local record cache for this query.

MMTX_QUERY_ORAMODE	   	16

If the database was connected using the MMTX_DATABASE_PARTIAL_INSERT flag,

then the query will behave the same.

MMTX_QUERY_NO_REFETCH	   	32

If the database was connected using the MMTX_DATABASE_NO_REFETCH flag,

then the query will behave the same.

MMTX_QUERY_NO_MOVEFIRST	   	64

Does not force a movefirst on query creation.

MMTX_QUERY_DIRTY_WRITE	  	128

Does not check for read consistency when updating cells or deleting rows.


Aggregation

An aggregate is an object just like any other object. It implements one or more interfaces. Internal to the aggregate however, the implementation of certain interfaces is provided by one or more contained objects.  Users of the aggregate are unaware of this internal structure.

Aggregate Object

The aggregation model essentially consists of two kinds of objects, the control object and the controlled objects.  As an example, Sedona is the control object and the Spread Table OCX as well as the sub objects of the Spread Table OCX are the controlled objects.  The control object forms the aggregate' s personality and determines how it operates, making decisions about which interfaces of the controlled object are exposed to the end user and which interfaces remain private to the control object.

The control object has a special instance of IUnknown interface known as the controlling unknown, sometimes called an outer unknown.

In order to use the aggregation feature you must be able to specify the controlling unknown for each object you wish to aggregate.  For the Spread Table OCX,  you can simple pass in a controlling unknown when you call CoCreateInstance.  To aggreate the subobjects, columns, rows, cells, column axis’, and row axis’, you must call a method in a custom interface called IMMTXRegister.  In order to call a method in the custom interface you must get a pointer to it.  Call CoCreateInstance and ask for the IID_IMMTXRegister interface.  Once you have a pointer to the interface you can call one of the methods below to set the controlling unknown for the corresponding subobjecs.  This controlling unknown will be used any time a subobject is created.

IMMTXRegister Methods

HRESULT SetColumnOuterUnknown(LPUNKNOWN pOuterUnknown);

Set the controlling unknown for all column objects.

HRESULT SetRowOuterUnknown(LPUNKNOWN pOuterUnknown);

Set the controlling unknown for all row objects.

HRESULT SetCellOuterUnknown(LPUNKNOWN pOuterUnknown);

Set the controlling unknown for all cell objects.

HRESULT SetColumnAxisOuterUnknown(LPUNKNOWN pOuterUnknown);

Set the controlling unknown for all column axis objects.

HRESULT SetRowAxisOuterUnknown(LPUNKNOWN pOuterUnknown);

 	Set the controlling unknown for all row axis objects.

IID_IMMTXRegister definition

const IID IID_IMMTXRegister = {0x8556CB51,0x157C,0x11cf,{0xBE,0x52,0x00,0x20,0xAF,0xE5,0x5F,0x5C}};