处理 WM5 CListView 中的滚动事件
在我的 WinModile 5 应用程序中,我使用具有报告样式的 CListView 来显示项目表。由于可能存在大量项目(> 1000),因此需要花费大量时间将它们全部插入。但大多数时候用户只需要前 50 个左右。我想在需要时动态插入项目。为此,需要捕获垂直滚动来添加项目。我找不到通过子类化 CListCtrl 和 CListView 来实现此目的的方法。
那么问题是是否有另一种方法可以实现按需渲染或捕获滚动事件而无需子类化?
In my WinModile 5 app I'm using CListView with report style to display a table of items. Since there can be significant amount of items(> 1000) it takes a lot of time to insert them all. But most of the time users only need first 50 or so. I would like to insert items dynamically when they are needed. To do this a need to catch the vertical scrolling to add items. I can't find a way to do this with our sub-classing the CListCtrl as well as CListView.
So the question is is there another way to implement on-demand rendering or to catch scroll events without sub-classing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您听说过虚拟列表视图吗?当包含大量数据的列表视图出现性能问题时,通常会使用虚拟列表视图。应用程序负责管理要在 Virtual ListView 中显示的数据。 Windows仅在需要显示数据时才会要求提供数据。 Windows Mobile SDK 中包含一个名为 VirtualListView 的示例项目。
Have you heard of Virtual ListViews? Virtual ListViews are typically used when you have performance problems with a listview containing a large amount of data. The application is responsible for managing the data to be displayed in the Virtual ListView. Windows will ask for the data only when it needs to display the data. A sample project named VirtualListView is included with the Windows Mobile SDK.