witam, czy jest ktos w stanie tak mniej wiecej napisac o co chodzi w tych procedurach? Dodam tylko ze sluzy to do tego aby ukryc jeden ze scrollbarow w komponencie TListView. wielkie dzieki z gory.

type
TForm1 = class(TForm)
ListView1: TListView;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
FListViewWndProc: TWndMethod;
procedure TForm1.ListViewWndProc(var Message: TMessage);
public
{ Private declarations }
FShowHoriz: Boolean;
FShowVert: Boolean;
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.ListViewWndProc(var Message: TMessage);
begin
if (Message.Msg = WM_WINDOWPOSCHANGING) then
ShowScrollBar(ListView1.Handle, SB_HORZ, False); // hide horiz scrollbar
FListViewWndProc(Message); // process message
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
FShowHoriz := True; // show the horiz scrollbar
FShowVert := False; // hide vert scrollbar
FListViewWndProc := ListView1.WindowProc; // save old window proc
ListView1.WindowProc := ListViewWndProc; // subclass
end;

procedure TForm1.FormDestroy(Sender: TObject);
begin
ListView1.WindowProc := FListViewWndProc; // restore window proc
FListViewWndProc := nil;
end;