首页  编辑  

鼠标中键问题

Tags: /超级猛料/Hardware.硬件相关/键盘和鼠标/   Date Created:

]、。·ˉˇ¨〃々—~‖…’”〕〉》」』〗】∶!"'),.:;?]` 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.

回复人:pino(2000-9-15 16:27:00)  得0分

我又重新做了一下试验,纠正一个错误

实际上 TMemo,TListBox,TComboBox 都支持中键自动滚屏,该功能由系统完成,

而 TRichEdit 确实不支持,实际上是系统不支持,看来只有自己编写滚屏部分了。

最后再问一个问题,谁知道滚屏的光标在那个系统文件里面?就是那个几个箭头!

有人答了马上分点数