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);
end;
TSkinListBox =
class(TInterfacedObject, ISkinListBox)
private
LStyle: DWORD;
FHOwner: HWND;
FHandle: HWND;
FEnumProcInst: Pointer;
ImgIcon: Cardinal;
ImgIconH: Cardinal;
ImgIconW: Cardinal;
function MakeProcInstance(M: TMethod): Pointer;
procedure SetCTLFont(hCtL: HWND; Font: hFont);
procedure SubClass(WinHandle: HWND);
procedure UnSubClass(WinHandle: HWND);
function GetHandle: hWnd;
public
property Handle: HWND
Read FHandle;
procedure SetFont(nPointSize: Integer; FontName: PAnsiChar; AktForecolor: COLORREF;
InAktForecolor: COLORREF; Shadow: Boolean; SOffset: Integer; ShadowColor: COLORREF);
function ListBoxProc(WinHandle: HWND; Msg: UINT; wP: WParam; lP: LParam): LRESULT;
stdcall;
procedure DrawItem(WinHandle: HWND;
Dc: Hdc;
Index: Integer;Rect: TRect; Selected: Bool);
procedure InitTrackbar;
procedure ListSetTopIndex(hList: HWND; nTopIndex: Integer);
function ListGetTopIndex(hList: HWND): Integer;
function ListGetSel(hList: HWND; nSelected: Integer): Bool;
function GetItemHeight(hList: HWND; ItemHeigh: Integer): Integer;
function ListCount(hList: HWND): Integer;
procedure ListDeleteAll(hList: HWND);
procedure ListDelete(hList: HWND; nIndex: Integer);
procedure ListSelectPlus(hList: HWND; nSelected: Integer);
function ListFindString(hList: HWND; Tmp:
string): Integer;
function ListGetCurSel(hList: HWND): Integer;
function ListAdd(hList: HWND; Tmp:
string): Integer;
function ListGetText(hList: HWND; Item: Integer): PAnsiChar;
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;