SB_THUMBTRACK The user is dragging the scroll box. This message is sent repeatedly until the user releases the mouse button. The high-order word indicates the position that the scroll box has been dragged to.
用API可 LONG SetWindowLong( HWND hWnd, int nIndex, LONG dwNewLong ); 例如:SetWindowLong(this->m_hWnd,GWL_STYLE,(LONG)WS_HSCROLL|WS_VSCROLL);
Creates a window that has a vertical scroll bar.
{
// TODO: Add your message handler code here and/or call default
// 竖直滚动条消息
switch ( nSBCode )
{ case SB_LINEUP:
ScrollWindow(0,5,NULL,NULL);
break;
case SB_LINEDOWN:
ScrollWindow(0,-5,NULL,NULL);
break;
case SB_PAGEUP: break;
case SB_PAGEDOWN:
break;
default:
break;
}
CDialog::OnVScroll(nSBCode, nPos, pScrollBar);
}
在响应垂直滚动条时候,拖拽滚动条对应哪个消息啊?
LONG SetWindowLong(
HWND hWnd,
int nIndex,
LONG dwNewLong
);
例如:SetWindowLong(this->m_hWnd,GWL_STYLE,(LONG)WS_HSCROLL|WS_VSCROLL);