Subject | Re: IB_ctrlGrid and wheel mouse |
---|---|
Author | pizzateig2002 |
Post date | 2004-03-04T08:30:05Z |
Bob,
Mouse wheel behaves strangely with dbgrids - this code handler will
correct this behavior. Just drop a TApplication component on a form
procedure Application1.OnMessage
(var Msg: TMsg; var Handled: Boolean);
var
i: SmallInt;
begin
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;
Mouse wheel behaves strangely with dbgrids - this code handler will
correct this behavior. Just drop a TApplication component on a form
procedure Application1.OnMessage
(var Msg: TMsg; var Handled: Boolean);
var
i: SmallInt;
begin
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;