滚动条移动 SetScrollPos 和 SendMessage
我正在尝试以编程方式移动窗口的滚动条。我首先发送 :,
SetScrollPos(handle, 1, position, true);
然后发送 :
SendMessage(handle, 0x0115, wparam, new IntPtr(0));
wparam 是正确的。当我通过spy++检查时,使用上述代码发送滚动和实际滚动之间的唯一区别是,在实际滚动中,消息嵌套级别为1,但这里为0。但除此之外,所有其他属性都相同,WM_VSCROLL、句柄、位置、wparam 等。但是编程滚动不会移动栏。 关于我做错了什么有什么建议吗???
PS:尝试从 ac# 应用程序执行此操作 非常感谢!
编辑:当我将 SB_BOTTOM 传递给 wparam 时,它会将我正确地带到滚动的末尾。
I'm trying to move the scrollbar of a window programatically. I'm first sending a :
SetScrollPos(handle, 1, position, true);
and then followed by :
SendMessage(handle, 0x0115, wparam, new IntPtr(0));
The wparam is correct. When i inspect through spy++, the only difference between sending a scroll with the above code and actually scrolling is that in the actual scroll, the message nesting level is 1 but here it is zero. But that apart, all the other properties and same, the WM_VSCROLL, handle, position, wparam etc. But the programatic scroll doesn't move the bar.
Any suggestions on what im doing wrong???
P.S: Trying to do this from a c# application
THanks a ton!
EDIT: when i pass SB_BOTTOM to the wparam, it takes me correctly to the end of the scroll.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最好使用 SetScrollInfo 函数手动发送消息。
It is better to use SetScrollInfo function instead of manually sending messages.