notification message from CSliderCtrl when starting to drag

Hi all,

in my application, I have a CSliderCtrl and also one timer.

at the timer event, I read the values from an instrument, and refresh the interface, also the CSliderCtrl. For some users, the interval of the timer is too short to change the value before it is refreshed.

I want to kill the timer when the user starts dragging the slider and agin start it after he stops.

right now I process the NM_REALEASEDCAPTURE message for getting the values from the slider. I did not find any NM_LBUTTONDOWN or so notification.


can anybody tell me the correct message to process .


thanks,
Hardik


Answer this question

notification message from CSliderCtrl when starting to drag

  • FredK5813

    There is a NM_CLICK notification! But I am not sure if the slider control supports it.

  • ydla

    No it will only be fired when it is clicked.

    But anyhow. You can solve this to in checking who has the capture. If the mouse is down and it is in drag mode, the slider control has the capture! (GetCapture)

    I think it is much easier to check this than to check every possible contrl state.



  • Sathish Kumar P

    Hi Martin,

    thanks.

    really nice idea. I will try it.

    but still the question of this event-notification remains !

    cheers,
    Hardik

  • Erwyn van der Meer

    Wouldn't it be easier to check in the handler of the timer if the left mouse button is down and the focus is on that slider ctrl!



  • DesperateCoder

    as far as I know, every window supports NM_CLICK, but I am not sure if it will be fired after the LBUTTON is up or during dragging

    if the later is true, it wont be very useful.


    thanks,
    Hardik

  • arpan_1234

    yes, I also think so. I thought it is not very elegant to manipulate Slider in the timer code (from OO point of view) but ok.. we dont have many choices.


    thanks

    Hardik

  • notification message from CSliderCtrl when starting to drag