Class TViewObject (unit myOle) |
Inherits from
IViewObject
constructor Create(UnkOuter: TMyOle);
- ////////////////////////////////////////////////////////////////////////////// IVIEWObject //////////////////////////////////////////////////////////////////////////////
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;
fAdviseSink : IADviseSink;
fRefCount : longint;
pointer to outer object
fUnkOuter : TMyOle;
constructor Create(UnkOuter: TMyOle);
////////////////////////////////////////////////////////////////////////////// IVIEWObject //////////////////////////////////////////////////////////////////////////////
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;
fAdviseSink : IADviseSink;
fRefCount : longint;
pointer to outer object
fUnkOuter : TMyOle;