我想通过点击工具栏中按钮实现VIEW中的LISTCTRL中的记录滚动?如何实现?

解决方案 »

  1.   

    m_UrlistCtrl.SetScrollPos(SB_VERT,GetScrollPos(SB_VERT)+5);
    m_UrlistCtrl.SetScrollPos(SB_VERT,GetScrollPos(SB_VERT)-5);
    //两句一个向下,一个向上
    试试看
      

  2.   

    ::SendMessage(m_list.GetSafeHwnd(),WM_VSCROLL,SB_LINEDOWN,NULL);
    ::SendMessage(m_list.GetSafeHwnd(),WM_VSCROLL,SB_LINEUP,NULL);ok这两个可以用了
      

  3.   

    wParam 
    The low-order word 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_PAGEUP Scrolls one page up. 
    SB_THUMBPOSITION The user has dragged the scroll box (thumb) and released the mouse button. The high-order word indicates the position of the scroll box at the end of the drag operation. 
    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. 
    SB_TOP Scrolls to the upper left. 
    具体你要scroll到哪里就看wParam吧//今天真丢人呀:(
      

  4.   

    wParam 
    The low-order word 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_PAGEUP Scrolls one page up. 
    SB_THUMBPOSITION The user has dragged the scroll box (thumb) and released the mouse button. The high-order word indicates the position of the scroll box at the end of the drag operation. 
    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. 
    SB_TOP Scrolls to the upper left. 
    具体你要scroll到哪里就看wParam吧//今天真丢人呀:(