Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#29

AW: Object (Interface) <> nil

  Alt 11. Sep 2017, 21:02
Ich habe es jetzt so gemacht.

Anwendung:
Delphi-Quellcode:
type
  TPopUpState = (OnPopupDestroyed);
  POPUPSTATECALLBACK = procedure(PopUpState: TPopUpState); stdcall;
  PopUpMenu := CTRL_PopUpMenuCreate(PopUpCallback);
Delphi-Quellcode:
procedure PopUpCallback(PopUpState: TPopUpState); stdcall;
begin
  case PopUpState of
    OnPopupDestroyed:
      PopUpMenu := nil;
  end;
end;
DLL:
Delphi-Quellcode:
var
  PopUpCallback : POPUPSTATECALLBACK;
Delphi-Quellcode:
function CTRL_PopUpMenuCreate(callback: POPUPSTATECALLBACK): ISkinPopUpMenu; stdcall;
begin

  result := TSkinPopUpMenu.Create();
  PopUpCallback := callback;
end;
Wenn Nil..
Delphi-Quellcode:
if SkinPopUpMenu = nil then
  PopUpCallback(OnPopupDestroyed);
funktioniert ganz gut kann es so belassen.
Danke für die Hilfe.

gruss
  Mit Zitat antworten Zitat