zoukankan      html  css  js  c++  java
  • 使Edit类编辑控制的内容滚动到想要的位置

     

    WM_VSCROLL Notification


    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.

    A window receives this message through its WindowProc function.

    Syntax

    WM_VSCROLL
    WPARAM wParam
    LPARAM lParam;
    

    Parameters

    wParam

    The high-order word specifies the current position of the scroll box if the low-order word is SB_THUMBPOSITION or SB_THUMBTRACK; otherwise, this word is not used.

    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.

    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.
    lParam
    If the message is sent by a scroll bar, this parameter is the handle to the scroll bar control. If the message is not sent by a scroll bar, this parameter is NULL.

    Return Value

    If an application processes this message, it should return zero.

       如果你希望你的edit组件自动滚动文本内容,就向它发送如下消息吧:
    SendMessage(RzRichEdit1.Handle,WM_VScroll,SB_TOP,0);//sb_top可根据上面的值设置。

  • 相关阅读:
    Codeforces Round #568 (Div. 2) D. Extra Element
    Codeforces Round #567 (Div. 2) B. Split a Number
    [dp+博弈]棋盘的必胜策略
    [暴力+前缀和]2019牛客暑期多校训练营(第六场)Upgrading Technology
    [set]Codeforces 830B-Cards Sorting
    [二分]煤气灶
    [STL] Codeforces 69E Subsegments
    剑指offer——判断B树是否是A树的子结构
    在浏览器地址栏输入URL执行后网页显示全过程
    链表反转【图解】
  • 原文地址:https://www.cnblogs.com/taobataoma/p/759715.html
Copyright © 2011-2022 走看看