Hex Editor
Hex Editor - Binary File Editing Software for Windows

IFileDocument.CanUndo Property

HHD Software - Hex Editor Serial Port Monitor USB Protocol Analyzer Network Monitor
 
 
 
< PreviousTopNext >
Declaration
Getting property value:
Automation:
bool  value = obj.CanUndo;
Native (C++):
HRESULT  get_ CanUndo ( [out, retval]   VARIANT_BOOL *  val) ;
Parameters
valPointer to a variable that receives a property value.
Return Value
Automation:True if you can call the Redo method and False otherwise.Native: S_OK or standard OLE error code.
Remarks
Determine if you can call the IFileDocument.Undo method.
Examples

Sample implementation of the Undo method

C++Copy Code
void Undo(IFileDocument *pFileDocument)
{
  VARIANT_BOOL bCanUndo;

  pFileDocument->get_CanUndo(&bCanUndo);
  if (bCanUndo == VARIANT_TRUE)
    pFileDocument->Undo();
}
    

Sample implementation of the Undo method

C#Copy Code
public void Undo(IFileDocument fdoc)
{
  if (fdoc.CanUndo) 
    fdoc.Undo();
}
    
< PreviousTopNext >
Copyright © 2012 HHD Software. All rights reserved.