Translating WM_MOUSEWHEEL messages 
Author Message
 Translating WM_MOUSEWHEEL messages

Hi Gurus

I am having a problem translating WM_MOUSEWHEEL messages in my application.
Windows by default sends this message to the window having the current
focus. I initiate my application and then iconize it to reside in the system
tray using the Shell_NotifyIcon() API. When I Left/Right/Double click the
icon in the tray, I can retrieve and handle the respective messages in my
app. So far so good.

Now, if I move the mouse wheel over the app icon in the tray, the
WM_MOUSEWHEEL messages are send to any other app that has the input focus.
Is there any way I can route this message to my app and handle them
there(since the mouse cursor is over the icon of my application)??

Second, if I click on my systray application icon, then any other running
application window with input focus will lose focus. Infact noone has the
focus. But still I am not able to capture the WM_MOUSEWHEEL message. Where
do these messages go if no application is having input focus??

In other words, I simply wanna handle any generated WM_MOUSEWHEEL messages
if the mouse pointer happens to be in the icon of my app sitting in the
system tray.

Thanks in advance.



Mon, 28 Feb 2005 14:20:31 GMT  
 Translating WM_MOUSEWHEEL messages

Quote:
> In other words, I simply wanna handle any generated WM_MOUSEWHEEL messages
> if the mouse pointer happens to be in the icon of my app sitting in the
> system tray.

The short answer as to how to do what you want: "don't". That's the way
Windows works and the way people who use it expect it to work. Chances are
if you succeed you will only cause frustration. If you feel you must do this
check the docs for the sections on system wide hooks.

Regards,
Will



Wed, 02 Mar 2005 09:47:47 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. WM_MOUSEWHEEL message anyone?

2. WM_MOUSEWHEEL message.

3. About the WM_MOUSEWHEEL Message

4. How do I intercept non-queued messages such as WM_MOUSEWHEEL

5. custom control in dialog doesnt get WM_MOUSEWHEEL message

6. Bug of CSplitterWnd and WM_MOUSEWHEEL message.

7. WM_MOUSEWHEEL message

8. Translating Window Messages

9. Pre translate message function is not calling

10. Translate Message

11. WM_MOUSEWHEEL

12. ActiveX does'nt receive WM_MOUSEWHEEL..

 

 
Powered by phpBB® Forum Software