Jump to content

GUISlider disappears...


Pascal257
 Share

Recommended Posts

Well I posted that issue some time ago and I still haven't found any resolution..

Maybe someone has an idea:

To control the position of a song I got a slider on my GUI.

The position gets captured by WM_Notify and changes the position in the song.

Unfortunately sometimes the slider disappears and leaves a grey bar.

Edit: To point out:

If you change the position using the slider it freezes. It doens't notify on focus anymore (Changing its color) and the tracker is no longer useable. But you can still click on it and it will give a GUIRead value.

When a new song then loads it disappears...

post-21692-1196636247_thumb.jpg

Func WM_NOTIFY($hWnd, $MsgID, $wParam, $lParam)
    If $Notify_WM And Not $Exit Then
        $Notify_WM = False
        Local $tagNMHDR, $event, $hwndFrom, $code
        $tagNMHDR = DllStructCreate("int;int;int", $lParam)
        If @error Then Return 0
        If ($wParam = $Searchview Or $wParam = $StatListView1) And DllStructGetData($tagNMHDR, 3) = -3 Then
            If $wParam = $Searchview Then
                If $SearchWait Then SetList(__GUICtrlListView_GetItemText($Searchview,_GUICtrlListView_GetNextItem($Searchview),5))
            Else
                Dim $Query[1]
                $StatInfo = StringSplit(__GUICtrlListView_GetItemText($StatListView1,_GUICtrlListView_GetNextItem($StatListView1)),"|")
                _SQLite_Query(-1, 'SELECT Path FROM Songs WHERE Artist = "' & $StatInfo[1] & '" AND Track = "' & $StatInfo[3] & '" AND Album = "' & $StatInfo[2] & '";', $hQuery)
                _SQLite_FetchData($hQuery, $Query)
                _SQLite_QueryFinalize($hQuery)
                SetList($Query[0])
            EndIf
        ElseIf $wParam = $pos_slider Then
            If $Changing And Int(WMGetPosition()) <> Int(GUICtrlRead($Pos_Slider)) Then WMSetPosition (GUICtrlRead($Pos_Slider))
        ElseIf $wParam = $Vol_Slider Then
            $Vol = GUICtrlRead($Vol_Slider)
            If Not $Muted Or $Muted And $Vol <> IniRead("db\settings.ini", "infos", "vol", $Vol) Then
                WMSetVolume ($Vol)
                _IniWrite("db\settings.ini", "infos", "vol", $Vol)
                ;GUICtrlSetData($Vol_Label, "Vol: " & $Vol & "%")
                $Muted = False
            EndIf
            GUICtrlSetTip($Vol_slider,$vol)
        EndIf
        $Notify_WM = True
    EndIf
    Return $GUI_RUNDEFMSG
EndFunc

The slider is then still useable but just without tracker...

Anyone an idea?

greetings,

Pascal

Edited by Pascal257
Link to comment
Share on other sites

It appears to me that the problem is not here! It is in this function WMSetPosition()

per this function there is only a "test' then it calls the above function

ElseIf $wParam = $pos_slider Then
            If $Changing And Int(WMGetPosition()) <> Int(GUICtrlRead($Pos_Slider)) Then WMSetPosition (GUICtrlRead($Pos_Slider))

8)

But WMSetPosition has nothing to do with the slider.

I can also call WMSetPostion(10), without any slider.

What do you mean with the "test"? The "If" is only to catch some error or problems right?

Link to comment
Share on other sites

  • 2 weeks later...

Ok I got the problem.

Its the adlib always trying to change the position...

Now my question:

How to check if the mouse is actually on the slider (focus) without any controlgetpos or mousegetpos stuff...

Is there any WM_Notify code?

Maybe this helps

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Hm nice try, but I haven't found something useful...

The problem is that the notification is always the same.

I tried setting a variable before changing the sliderpos. Then reset the variable back to 0 on WM_Notify.

So I catch user-notifications. The problem is that WM_Notify does not need to be called.

Sometimes it does and sometimes not, so this resolution isn't possible...

Its annoying... I cant find any solution

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...