Einzelnen Beitrag anzeigen

marabu

Registriert seit: 6. Apr 2005
10.109 Beiträge
 
#10

Re: TWebbrowser Gridshow und Snap-to-grid CtoPas

  Alt 20. Apr 2006, 20:51
Zitat von Mavarik:
Also drei Mal QueryInterface mit unterschiedlichen Auswirkungen...
Naja, nicht ganz.

Wolltest du es vielleicht so?

Delphi-Quellcode:
// ungetestet

function TForm1.QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
begin
  Result := S_OK;
  if IsEqualGUID(IID, IID_IElementBehaviorFactory) then
    IInterface(Obj) := self as IElementBehaviorFactory else
  if IsEqualGUID(IID, IID_IElementBehavior) then
    IInterface(Obj) := self as IElementBehavior else
  if IsEqualGUID(IID, IID_IHTMLPainter) then
    IInterface(Obj) := self as IHTMLPainter else
  Result := inherited QueryInterface(IID, Obj);
end;
marabu
  Mit Zitat antworten Zitat