<< Return to Main Index

< Return to Class Index

CGXGridCore::MoveCells

virtual BOOL MoveCells(CGXRange rg, ROWCOL nRow, ROWCOL nCol, CObject* pUndoInfo = NULL, UINT flags = GX_UPDATENOW, GXCmdType ctCmd = gxDo);

rg

Specifies the source range of cells.

nRow

Specifies the destination row coordinates.

nCol

Specifies the destination column coordinate

pUndoInfo

A reference to a object that holds and receives undo information generated by the formula engine. You should simply pass NULL when you call MoveCells.

flags

GX_INVALIDATE - invalidates the window.

ctCmd

Specifies if the executed command is undone (gxUndo), redone (gxRedo), executed the first time (gxDo) or rolled back (gxRollback).

Return Value

TRUE if the operation was succesfull ; FALSE otherwise

Remarks

Command for moving cells from source to dest. Cell references in formula expressions that depend on cells in the moved range will be adjusted.

MoveCells will be called from OnPasteDirect when the user has cut/paste a range of cells.

Control-Factory Specific ->

This method has been implemented using the abstraction mechanism as discussed in the chapter "Reducing the size of your application" in the user's guide. A call to the ImplementDirectCopyMoveCells method from within the control factory class' InitializeGridComponents method will make the concrete implementation of this method available to your application.

If no concrete implementation is available this method returns FALSE. A warning will be displayed in the debug window.

END Control-Factory Specific

See Also

CGXFormulaSheet::StoreMoveCells CGXGridCore::OnPasteDirect

CGXGridCore

Class Overview | Class Members