CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Location
    Nottingham, UK
    Posts
    35

    Everytime I move the slider bar in my dialog OnHScroll gets called 3 times instead of 1

    Any ideas?


  2. #2
    Join Date
    May 1999
    Location
    Mass, USA.
    Posts
    103

    Re: Everytime I move the slider bar in my dialog OnHScroll gets called 3 times instead of 1

    You're getting WM_HSCROLL messages with different scroll codes (wParam's). You're probably receiving SB_THUMBPOSITION, SB_THUMBTRACK and SB_ENDSCROLL.

    From VC++ online help:


    SB_BOTTOM
    Scrolls to the lower right.

    SB_ENDSCROLL
    Ends scroll.

    SB_LINELEFT
    Scrolls left by one unit.

    SB_LINERIGHT
    Scrolls right by one unit.

    SB_PAGELEFT
    Scrolls left by the width of the window.

    SB_PAGERIGHT
    Scrolls right by the width of the window.

    SB_THUMBPOSITION
    Scrolls to the absolute position. The current position is specified by the nPos parameter.

    SB_THUMBTRACK
    Drags scroll box to the specified position. The current position is specified by the nPos parameter.

    SB_TOP
    Scrolls to the upper left.



    /ravi


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured