Class TRichEditWithOle (unit Richole)

Inherits from

TRichEdit

Constructors



Functions

destructor destroy;

FHandle is set to 0 in inherited procedure, so we release IRichEditOle

procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState;var Accept: Boolean);


procedure InsertObject(theObject:TMyOle;pos:integer);


procedure InsertObject2(theObject:IOleObject;pos:integer;storage:IStorage);

Release for StgCreateDocfileOnILockBytes

procedure CreateWindowHandle(const Params: TCreateParams);

valid only during drag function QueryAcceptDelphiData(source:TObject;cp:Dword):boolean; virtual;

////////////////////////////////////////////////////////////////////////////// /// TRichEditWithOle //////////////////////////////////////////////////////////////////////////////


procedure DestroyWindowHandle;

we do not need this anymore.

function GetDelphiObject(i:integer):TDelphiOle;


function GetObject(i:integer):IOleObject;


function GetObjectCount:longint;

property access methods

procedure GetOleFromDragSource(Source:TObject;var OleObject:TDelphiOle);

IS THIS NECCESSARY? (my guess

function GetReObject(i:integer):TReObject;

nil, if object is not Delphi Object

function QueryInsertObject(const clsid:TClsid;storage:IStorage;cp:longint):hresult;


procedure WMNCDestroy(var Message: TWMNCDestroy);


Properties

property delphiObjects : TDelphiOle


property objectCount : longint


property objects : IOleObject

warning: Do not forget to call Release, when you don't need object anymore!!!

property richEditOle : IRichEditOle


Events

event OnGetOleDragFromSource : TGetOleFromDragSourceEvent


event OnQueryInsertDelphiObject : TQueryInsertDelphiObjectEvent


event OnQueryInsertObject : TQueryInsertObjectEvent

nil if .

Variables

draggingDelphiData : boolean;


fDragSource : TObject;

true, while user is dragging Delphi data over us

fRichEditOle : IRichEditOle;


fGetOleFromDragSource : TGetOleFromDragSourceEvent;


fQueryInsertDelphiObject : TQueryInsertDelphiObjectEvent;


fQueryInsertObject : TQueryInsertObjectEvent;



Constructors


Functions


destructor destroy;

FHandle is set to 0 in inherited procedure, so we release IRichEditOle


procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState;var Accept: Boolean);


procedure InsertObject(theObject:TMyOle;pos:integer);


procedure InsertObject2(theObject:IOleObject;pos:integer;storage:IStorage);

Release for StgCreateDocfileOnILockBytes


procedure CreateWindowHandle(const Params: TCreateParams);

valid only during drag function QueryAcceptDelphiData(source:TObject;cp:Dword):boolean; virtual;

////////////////////////////////////////////////////////////////////////////// /// TRichEditWithOle //////////////////////////////////////////////////////////////////////////////


procedure DestroyWindowHandle;

we do not need this anymore. RichEdit already holds on it


function GetDelphiObject(i:integer):TDelphiOle;


function GetObject(i:integer):IOleObject;


function GetObjectCount:longint;

property access methods


procedure GetOleFromDragSource(Source:TObject;var OleObject:TDelphiOle);

IS THIS NECCESSARY? (my guess


function GetReObject(i:integer):TReObject;

nil, if object is not Delphi Object


function QueryInsertObject(const clsid:TClsid;storage:IStorage;cp:longint):hresult;


procedure WMNCDestroy(var Message: TWMNCDestroy);


Properties


property delphiObjects : TDelphiOle


property objectCount : longint


property objects : IOleObject

warning: Do not forget to call Release, when you don't need object anymore!!!


property richEditOle : IRichEditOle


Events


event OnGetOleDragFromSource : TGetOleFromDragSourceEvent


event OnQueryInsertDelphiObject : TQueryInsertDelphiObjectEvent


event OnQueryInsertObject : TQueryInsertObjectEvent

nil if ..[i] is not Delphi object


Variables


draggingDelphiData : boolean;


fDragSource : TObject;

true, while user is dragging Delphi data over us


fRichEditOle : IRichEditOle;


fGetOleFromDragSource : TGetOleFromDragSourceEvent;


fQueryInsertDelphiObject : TQueryInsertDelphiObjectEvent;


fQueryInsertObject : TQueryInsertObjectEvent;