[Win32] Stop multiple WM_VSCROLL

Started by
0 comments, last by monchito 13 years, 9 months ago
Hi
There is only one scroll bar
When I push once the up or down arrows of the vertical scroll bar I get a multiple WM_VSCROLL, sometimes 3, 5, 10... How can avoid this behavior? Why is this error?

    ...    case WM_VSCROLL:      {        switch(LOWORD(wParam))        {          case SB_LINEUP: curPos-=10;     break;          case SB_LINEDOWN: curPos+=10;   break;          case SB_PAGEUP: curPos -= 64;   break;          case SB_PAGEDOWN: curPos += 64; break;          case SB_THUMBPOSITION: newPos = (HIWORD(lParam)); break;          default: NewPos = curPos;       break;        }        si.cbSize = sizeof(si);        si.fMask = SIF_POS;        si.nPos = curPos;        SetScrollInfo(hDialogHandle, SB_VERT, &si, TRUE);        InvalidateRect( NULL, TRUE );        MessageBox(..."WM_VSCROLL"... );        ...      }      break;
Advertisement
The error was caused by the MessageBox(..."WM_VSCROLL"... ); to know certain values. Eliminated that an all is working ok.
Sorry about that.

This topic is closed to new replies.

Advertisement