• Advertisement
Sign in to follow this  

[Win32] Stop multiple WM_VSCROLL

This topic is 2777 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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;



Share this post


Link to post
Share on other sites
Advertisement
The error was caused by the MessageBox(..."WM_VSCROLL"... ); to know certain values. Eliminated that an all is working ok.
Sorry about that.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement