Hallo we have developed a application using Delphi 7. The entire application uses DBGRID. I cannot use mousewheel in DBGRID. I wrote the following code so that the functionality of mousewheel is used in DBGRID for entire application.
procedure TApplication.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;
But now I am facing a prob. In the above code I am overwritting the message for the mousewheel for entire application with the down and up arrow key. But now in one forms I have map and I have to use the functionality of MouseWheel which is normal zoom in and zoom out for a mousewheel. Is there any way in which I can bring back the funtionality of mousewheel only for one form. Anyway I can modify the above code to understand that the call is from the required form and I have to use the original functionality..
Suggestions will be appretiated..
Thanks in Advance.
procedure TApplication.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;
But now I am facing a prob. In the above code I am overwritting the message for the mousewheel for entire application with the down and up arrow key. But now in one forms I have map and I have to use the functionality of MouseWheel which is normal zoom in and zoom out for a mousewheel. Is there any way in which I can bring back the funtionality of mousewheel only for one form. Anyway I can modify the above code to understand that the call is from the required form and I have to use the original functionality..
Suggestions will be appretiated..
Thanks in Advance.