Jump to content
Sign in to follow this  
MISIIM

Something like nm_midclk?

Recommended Posts

MISIIM

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
smashly

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
rasim

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
Siao

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
MISIIM

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  

×