UndoBlock
constructor
UndoBlock( int nNameID = 0, BOOL bUndo = TRUE )
EX1
void UndoBlock_UndoBlock_ex1() { // get format from Graph1 page GraphPage pageSrc("Graph1"); Tree tree; tree = pageSrc.GetFormat(); if( tree ) { // get undo block ID before any changes int nIDbefore = Project.UndoBlockId(); // better to limit scope of undo block { // start new undo block and save all changes there UndoBlock block; // apply format to Graph2 page GraphPage pageDst1("Graph2"); BOOL bb = pageDst1.ApplyFormat(tree,true,false,true); // apply format to Graph3 page GraphPage pageDst2("Graph3"); bb = pageDst2.ApplyFormat(tree,true,false,true); } // get undo block ID after all changes int nIDafter = Project.UndoBlockId(); // undo all changes from the added undo block Project.Undo(); } }
origin.h