如何更改窗口滚动栏的位置?
How to change the position of the Vertical Scrollbar of a window?
I'm referring to the position in xy, for example set it in the middle of the window instead of the edges.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法重新定位窗口内置的滚动条。您将必须禁用本机滚动条(删除窗口的
ws_hscroll
/ws_vscroll
样式),然后创建一个单独的 scrollbar 作为窗口的孩子控制。然后,您可以使用x
/y
createwindow/ex()
setwindowpos()的参数使用x
/ y y y y y y 。You cannot reposition a scrollbar that is built-in to a window. You will have to disable the native scrollbar (remove the window's
WS_HSCROLL
/WS_VSCROLL
style) and then create a separate ScrollBar control as a child of the window. Then you can position that child wherever you want, using thex
/y
parameters ofCreateWindow/Ex()
orSetWindowPos()
.