拖动滚动条时出现波动,怎样解决

来源:百度知道 编辑:UC知道 时间:2024/05/15 16:15:03
让她稳定

不知道你是怎麽做的,滚动条的事件可以直接用消息来做,截取的消息是WM_VScroll和WM_HSCroll,一个是竖直方向的,一个是横向的。然后在上面可以在截取裏面的消息,分得还有。
The WM_VSCROLL message is sent to a window when a scroll event occurs in the window's standard vertical scroll bar. This message is also sent to the owner of a vertical scroll bar control when a scroll event occurs in the control.

WM_VSCROLL
nScrollCode = (int) LOWORD(wParam); // scroll bar value
nPos = (short int) HIWORD(wParam); // scroll box position
hwndScrollBar = (HWND) lParam; // handle of scroll bar

Parameters

nScrollCode

Value of the low-order word of wParam. Specifies a scroll bar value that indicates the user's scrolling request. This parameter can be one of the following values:

Value Meaning
SB_BOTTOM Scrolls to the lower right.
SB_ENDSCROLL Ends scroll.
SB_LINEDOWN Scrolls one line down.
SB_LINEUP Scrolls one line up.
SB_PAGEDOWN Scrolls one page down.
SB