AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

An die Profis nochmal Interface

Ein Thema von EWeiss · begonnen am 13. Mär 2011 · letzter Beitrag vom 15. Mär 2011
 
Benutzerbild von chaosben
chaosben

Registriert seit: 27. Apr 2005
Ort: Görlitz
1.358 Beiträge
 
Delphi XE2 Professional
 
#4

AW: An die Profis nochmal Interface

  Alt 13. Mär 2011, 16:58
Also ich habs jetzt mal ausprobiert und die Variante 1 funzt bei mir ohne Probleme.

Delphi-Quellcode:
unit Unit29;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  ISkinListBox = interface
    ['{38EF3B4F-86A1-45D0-A7F3-4E45E125979D}']
    function GetHandle: hWnd;
    property Handle: hWnd read GetHandle;
    procedure SetFont(nPointSize: Integer; FontName: PAnsiChar; AktForecolor: COLORREF;
      InAktForecolor: COLORREF; Shadow: Boolean; SOffset: Integer; ShadowColor: COLORREF);
    procedure InitTrackbar;
  end;

  TMyTest = class(TinterfacedObject, ISkinListBox)
  private
    function GetHandle: hWnd;
    property Handle: hWnd read GetHandle;
    procedure SetFont(nPointSize: Integer; FontName: PAnsiChar; AktForecolor: COLORREF;
      InAktForecolor: COLORREF; Shadow: Boolean; SOffset: Integer; ShadowColor: COLORREF);
    procedure InitTrackbar;
  public
    destructor Destroy; override;
  end;

  TForm29 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form29: TForm29;

implementation

{$R *.dfm}

procedure TForm29.FormCreate(Sender: TObject);
var
  slb : ISkinListBox;
begin
  slb := tMYTest.Create;
  slb := nil;
end;

{ TMyTest }

destructor TMyTest.Destroy;
begin
  asm int 3; end;
  inherited;
end;

function TMyTest.GetHandle: hWnd;
begin

end;

procedure TMyTest.InitTrackbar;
begin

end;

procedure TMyTest.SetFont(nPointSize: Integer; FontName: PAnsiChar;
  AktForecolor, InAktForecolor: COLORREF; Shadow: Boolean; SOffset: Integer;
  ShadowColor: COLORREF);
begin

end;

end.
Benjamin Schwarze
If I have seen further it is by standing on the shoulders of Giants. (Isaac Newton)
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:53 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz