Hex Editor
Hex Editor - Binary File Editing Software for Windows

IMultiSelection.TotalSize Property

HHD Software - Hex Editor Serial Port Monitor USB Protocol Analyzer Network Monitor
 
 
 
< PreviousTopNext >
Declaration
Getting property value:
Automation:
ulong  value = obj.TotalSize;
Native (C++):
HRESULT  get_ TotalSize ( [out, retval]   unsigned __int64 *  pTotalSize) ;
Parameters
pTotalSizePointer to a variable that receives a property value.
Return Value
Automation:The total size of the selection object.Native: S_OK or standard OLE error code.
Remarks
Returns the total selection size. This is a sum of sizes of all selection ranges. Complexity: constant-time.
Examples

Using TotalSize property

JavaScriptCopy Code
var fdoc = new ActiveXObject("FileDocument.FileDocument");
var msel = fdoc.CreateEmptySelection();

msel.ToggleRange(100, 50);  // selection: [100..150)
alert(msel.TotalSize); // displays "50"
msel.ToggleRange(100, 10);  // selection: [110..150)
alert(msel.TotalSize); // displays "40"
msel.ToggleRange(0, 10);  // selection: [0..10) U [110..150)
alert(msel.TotalSize); // displays "50"
msel.ToggleRange(140, 20);  // selection: [0..10) U [110..140) U [150..160)
alert(msel.TotalSize); // displays "50"
msel.ToggleRange(10, 100);  // selection: [0..140) U [150..160)
alert(msel.TotalSize); // displays "150"
    
< PreviousTopNext >
Copyright © 2012 HHD Software. All rights reserved.