Ontosy Posted August 18, 2012 Posted August 18, 2012 $NM_RELEASEDCAPTURE intercept when i relaes the mouse in a slider control. How to intercept when i scroll the mouse over a silder control or when change the position?
JScript Posted August 18, 2012 Posted August 18, 2012 Try this example: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $iSlider, $hSlider, $iDumSlider Example() Func Example() Local $button, $msg GUICreate("slider", 220, 100) GUISetBkColor(0x00E0FFFF) ; will change background color $iSlider = GUICtrlCreateSlider(10, 10, 200, 20) GUICtrlSetLimit(-1, 200, 0) ; change min/max value GUICtrlSetCursor(-1, 0) GUICtrlSetState(-1, $GUI_FOCUS) $hSlider = GUICtrlGetHandle($iSlider) $iDumSlider = GUICtrlCreateDummy() $button = GUICtrlCreateButton("Value?", 75, 70, 70, 20) GUISetState() GUIRegisterMsg($WM_HSCROLL, "_GUIEvents") GUICtrlSetData($iSlider, 45) ; set pos Do $msg = GUIGetMsg() If $msg = $button Then MsgBox(0, "iSlider", GUICtrlRead($iSlider), 2) EndIf Until $msg = $GUI_EVENT_CLOSE EndFunc ;==>Example Func _GUIEvents($hWnd, $iMsgID, $WParam, $LParam) #forceref $hWnd, $iMsgID, $wParam, $lParam Switch $iMsgID Case $WM_HSCROLL Switch $LParam Case $hSlider GUICtrlSendToDummy($iDumSlider, GUICtrlRead($iSlider)) EndSwitch EndSwitch EndFunc ;==>_GUIEvents Regards, João Carlos. http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!
JScript Posted August 18, 2012 Posted August 18, 2012 Ok, and the example worked for you or not? JS http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!
Ontosy Posted August 18, 2012 Author Posted August 18, 2012 yes, but i used only GUIRegisterMsg($WM_HSCROLL, "_GUIEvents")
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now