Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#1

Class spezialisten

  Alt 1. Feb 2009, 13:02
Hab jetzt meine ListBox fast fertig.
Kann bitte mal jemand in die Class schaun und mir sagen was ich besser machen könnte.
Mir geht es um die Bedienbarkeit von außen.

Delphi-Quellcode:
type
  TSkinListBox = class
  private
    LStyle: DWORD;
    FHOwner : HWND;
    procedure SetCTLFont(hCtL: HWND; Font: hFont);
    procedure SubClass(WinHandle: HWND);
    procedure UnSubClass(WinHandle: HWND);
  public
    Handle: HWND;
    procedure SetFont(nPointSize: Integer; FontName: PAnsiChar; AktForecolor: COLORREF;
      InAktForecolor: COLORREF; Shadow: Boolean; SOffset: Integer; ShadowColor: COLORREF);

    class procedure DrawItem(WinHandle: HWND; Dc: Hdc; Index: Integer;Rect: TRect; Selected: Bool);
    procedure DrawItems(lP: Integer);
    class procedure ListSetTopIndex(hList: HWND; nTopIndex: Integer);
    class function ListGetTopIndex(hList: HWND): Integer;
    class function ListGetSel(hList: HWND; nSelected: Integer): Bool;
    class function GetItemHeight(hList: HWND; ItemHeigh: Integer): Integer;

    constructor Create(hOwner: HWND; FullpathImageName: string; x, y, xW, yH,
      ListID: integer; Visible: Boolean; ItemHeight: Integer; BackColor: COLORREF);
    destructor Destroy; override;
  end;

type
  LBTYPE = Record
    AktForecolor : COLORREF;
    InAktForecolor : COLORREF;
    Backcolor : COLORREF;
    Shadow : Boolean;
    ShadowColor : COLORREF;
    ShadowOffset : Integer;
    ForeColorSelected : COLORREF;
    BackColorSelected : COLORREF;
    PointSize : Integer;
    DrawStyle : Integer;
    BorderStyle : Integer;
    Icon : string;
    ItemHeight : Integer;
    Handle : HWND;
    Left : Integer;
    Top : Integer;
    Width : Integer;
    Height : Integer;
    Font : HFONT;
  end;
gruss Emil
Miniaturansicht angehängter Grafiken
aufzeichnen_975.jpg  
  Mit Zitat antworten Zitat