Class TViewObject (unit myOle)

Inherits from

IViewObject

Constructors


constructor Create(UnkOuter: TMyOle);

////////////////////////////////////////////////////////////////////////////// IVIEWObject //////////////////////////////////////////////////////////////////////////////


Functions

function AddRef: Longint;


destructor Destroy;

.

function Draw(dwDrawAspect: Longint; lindex: Longint; pvAspect: Pointer; ptd: PDVTargetDevice; hicTargetDev: HDC; hdcDraw: HDC; prcBounds: PRect; prcWBounds: PRect; fnContinue: TContinueFunc; dwContinue: Longint): HResult;

delegates call to outer object

function Freeze(dwDrawAspect: Longint; lindex: Longint; pvAspect: Pointer; var dwFreeze: Longint): HResult;


function GetAdvise(pAspects: PLongint; pAdvf: PLongint; var advSink: IAdviseSink): HResult;

OLE_E_ADVISENOTSUPPORTED;

function GetColorSet(dwDrawAspect: Longint; lindex: Longint; pvAspect: Pointer; ptd: PDVTargetDevice; hicTargetDev: HDC; var colorSet: PLogPalette): HResult;

we should check other parameters too, but for now, we handle only drawing to screen

function QueryInterface(const iid: TIID; var obj): HResult;

delegates call to outer object

function Release: Longint;

delegates call to outer object

function SetAdvise(aspects: Longint; advf: Longint; advSink: IAdviseSink): HResult;


function Unfreeze(dwFreeze: Longint): HResult;


Properties

Events

Variables

fAdviseSink : IADviseSink;


fRefCount : longint;

pointer to outer object

fUnkOuter : TMyOle;



Constructors


constructor Create(UnkOuter: TMyOle);

////////////////////////////////////////////////////////////////////////////// IVIEWObject //////////////////////////////////////////////////////////////////////////////


Functions


function AddRef: Longint;


destructor Destroy;

.. the outer object should not explicitly call addref after TMyDataObject.Create


function Draw(dwDrawAspect: Longint; lindex: Longint; pvAspect: Pointer; ptd: PDVTargetDevice; hicTargetDev: HDC; hdcDraw: HDC; prcBounds: PRect; prcWBounds: PRect; fnContinue: TContinueFunc; dwContinue: Longint): HResult;

delegates call to outer object


function Freeze(dwDrawAspect: Longint; lindex: Longint; pvAspect: Pointer; var dwFreeze: Longint): HResult;


function GetAdvise(pAspects: PLongint; pAdvf: PLongint; var advSink: IAdviseSink): HResult;

OLE_E_ADVISENOTSUPPORTED;


function GetColorSet(dwDrawAspect: Longint; lindex: Longint; pvAspect: Pointer; ptd: PDVTargetDevice; hicTargetDev: HDC; var colorSet: PLogPalette): HResult;

we should check other parameters too, but for now, we handle only drawing to screen


function QueryInterface(const iid: TIID; var obj): HResult;

delegates call to outer object


function Release: Longint;

delegates call to outer object


function SetAdvise(aspects: Longint; advf: Longint; advSink: IAdviseSink): HResult;


function Unfreeze(dwFreeze: Longint): HResult;


Properties


Events


Variables


fAdviseSink : IADviseSink;


fRefCount : longint;

pointer to outer object


fUnkOuter : TMyOle;