补充一点,Tlistbox 却支持中键滚屏,奇怪,是不是在继承时有消息被过滤掉了?

解决方案 »

  1.   


      This problem is too easy le!  When the user pushes the middle button in your client area, Windows will send a WM_MBUTTONDOWN message, similar as WM_LBUTTONDOWN too u. You can overload it to implement your action. When the middle button is moving(let's just say so), u will receive a WM_MOUSEWHEEL message. You can process this message just as you process WM_VSCROLL, but is easier.  By the way, if u want to have some special cursor, u'll have to use standard LoadCursor(From your own resource) and SetCursor API, according to the mouse action.  Why the default window does not implement this is because that it is imposible to know your scroll limit. You can provide your own class(which use virtual functions) to have the default process.
      

  2.   

    我又重新做了一下试验,纠正一个错误
    实际上 TMemo,TListBox,TComboBox 都支持中键自动滚屏,该功能由系统完成,
    而 TRichEdit 确实不支持,实际上是系统不支持,看来只有自己编写滚屏部分了。最后再问一个问题,谁知道滚屏的光标在那个系统文件里面?就是那个几个箭头!
    有人答了马上分点数
      

  3.   


        谁需要了我Email给他。
      

  4.   

    我要,谢谢。
    [email protected]
      

  5.   

    我要,谢谢
    [email protected]