Sign in to follow this  
Followers 0
MISIIM

Something like nm_midclk?

5 posts in this topic

#1 ·  Posted (edited)

Is there any notification for use with WM_NOTIFY that is sent on a middle/mouse wheel click?

I looked around MSDN for something, but I couldn't find anything.

Thanks a lot.

Edited by MISIIM

Share this post


Link to post
Share on other sites



I know you asked for WM_NOTIFY and I'm not sure if this helps.

But you can register the middle mouse click with it's constant and GuiRegisterMsg()..

#include <GUIConstants.au3>

Global Const $WM_MBUTTONDOWN = 0x0207

GUICreate("My GUI")
GUISetState (@SW_SHOW)

GUIRegisterMsg($WM_MBUTTONDOWN, "WM_MBUTTONDOWN_FUNC")

While 1
    If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit
Wend
    
Func WM_MBUTTONDOWN_FUNC($hWnd, $Msg, $wParam, $lParam)
    ConsoleWrite("$WM_MBUTTONDOWN = 0x" & Hex($Msg, 4) & @LF)
    Return $GUI_RUNDEFMSG
EndFunc

Cheers

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I know you asked for WM_NOTIFY and I'm not sure if this helps.

But you can register the middle mouse click with it's constant and GuiRegisterMsg()..

#include <GUIConstants.au3>

Global Const $WM_MBUTTONDOWN = 0x0207

GUICreate("My GUI")
GUISetState (@SW_SHOW)

GUIRegisterMsg($WM_MBUTTONDOWN, "WM_MBUTTONDOWN_FUNC")

While 1
    If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit
Wend
    
Func WM_MBUTTONDOWN_FUNC($hWnd, $Msg, $wParam, $lParam)
    ConsoleWrite("$WM_MBUTTONDOWN = 0x" & Hex($Msg, 4) & @LF)
    Return $GUI_RUNDEFMSG
EndFunc

Cheers

Hi @smashly! I know about this message, but it work only for window, not for controls. Need another solution... :) Edited by rasim

Share this post


Link to post
Share on other sites

Subclass the listview. Then you can catch its WM_MBUTTONDOWN.


"be smart, drink your wine"

Share this post


Link to post
Share on other sites

May I ask how I would sub class a control? (I am actually using a tab control.)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0