[Lazarus] How to handle WM_MOUSEWHEEL?
And3mD
and3md at gmail.com
Wed Nov 3 20:23:51 CET 2010
Thx for your approach.
I try something like this:
function WndCallback(Ahwnd: HWND; uMsg: UINT; wParam: WParam; lParam:
LParam):LRESULT; stdcall;
begin
if uMsg=WM_MOUSEWHEEL then
begin
ShowMessage('Handled');
exit;
end;
result:=CallWindowProc(PrevWndProc,Ahwnd, uMsg, WParam, LParam);
end;
And the message is handled when mouse is over some components, and not
handled on others.
For Example it is handled when mouse is over TPanel on window but not when
mouse is over TEdit or "Panel on Panel".
Anyone know why?
Greetings
Andrzej Kilijanski
Dnia 02-11-2010 o 13:42:13 Sven Barth <pascaldragon at googlemail.com>
napisaĆ(a):
> Am 01.11.2010 22:31, schrieb And3mD:
>> Hello
>>
>> I want to do some mouse scrolling control without focus.
>> So I need handle WM_MOUSEWHEEL by myself. This message is not always
>> caught by window WndProc.
>>
>>
>> In Delphi simply you can do that in TApplication.OnMessage().
>>
>> In Lazarus i found only TApplication.OnUserInput but there is only
>> message type in parameters (Sender: TObject;Msg: Cardinal).
>>
>> How should I handle WM_MOUSEWHEEL in Lazarus?
>
> You might want to take a look here:
> http://wiki.freepascal.org/Win32/64_Interface#Processing_non-user_messages_in_your_window
>
> I'm using that approach successfully on Windows Mobile.
>
> Regards,
> Sven
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
More information about the Lazarus
mailing list