...maker the mouse wheel works correct in TDBGrid?
Author: A D'Cruze
{....}
public
procedure AppMessage(var Msg: TMsg; var Handled: Boolean);
{....}
procedure TForm1.AppMessage(var Msg: TMsg; var Handled: Boolean);
var
i: SmallInt;
begin
{Mouse wheel behaves strangely with dgbgrids - this proc sorts this out}
if Msg.message = WM_MOUSEWHEEL then
begin
Msg.message := WM_KEYDOWN;
Msg.lParam := 0;
i := HiWord(Msg.wParam);
if i > 0 then
Msg.wParam := VK_UP
else
Msg.wParam := VK_DOWN;
Handled := False;
end;
end;
// Und im Projekt Source:
// And in the project source:
{....}
Application.OnMessage := Form1.AppMessage;
{....}
printed from
www.swissdelphicenter.ch
developers knowledge base