ListView的PostMessage [英] PostMessage for ListView
问题描述
我搜索了Google指向我的所有地方,但仍然遇到麻烦.
使用setScrollPos移动滚动条后,可以向文本框发送消息以滚动其内容.
这是通过PostMessage完成的,并发布了WM_VSCROLL
消息(它是277的整数).
我的问题是,这不适用于列表视图.建议使用LVM_SCROLL
.
我已经搜索了如何实现此消息或只是要传递的常量int,但没有运气.
任何帮助将不胜感激!
Hi,
I''ve searched everywhere Google points me to and I''m still having trouble.
I can send a message to a textbox to scroll its contents after moving the scrollbar with setScrollPos.
This is done with PostMessage and posting the WM_VSCROLL
message (which is an int of 277).
My problem is that this does not work for a listview. Suggestions were to use LVM_SCROLL
.
I''ve searched for how to implement this message or just the constant int to pass, but had no luck.
Any help would be appreciated!
推荐答案
I''ve搜索了如何实现消息或仅传递要传递的常量int,但没有运气
I''ve searched for how to implement the message or just the constant int to pass, but no luck
您也可以使用 ListView_Scroll宏 [
You may also use the ListView_Scroll macro[^]. It looks straightforward and well documented.
:)
解决了.
我必须将SendMessage API与LVM_SCROLL一起使用.它按指定的像素数量滚动ListView.
谢谢!
Solved it.
I had to use SendMessage API with LVM_SCROLL. It scrolls the ListView by the amount of pixels specified.
Thanks!
这篇关于ListView的PostMessage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!