动态显示编辑控件滚动条 [英] Show Edit control Scrollbars dynamically

查看:78
本文介绍了动态显示编辑控件滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我一直在尝试创建一个编辑框,但是在此控件的初始创建过程中,我试图隐藏垂直"和水平"滚动条,因为它们不是必需的.
但是,当用户输入文本时,一旦他达到垂直页面限制或水平页面限制,我就想显示相应的滚动条.

我该怎么办?

Hi,
I have been trying to create an edit box but during the initial creation of this control I am trying to hide the Vertical and Horizontal scroll bars as they are not required.
But when the user enters text and once he reaches the vertical page limit or horizontal page limit I would want to show the respective scroll bars.

How do I do this?

case WM_CREATE:
   /* here hEdit is created */
   ShowScrollBar(hEdit, SB_BOTH, FALSE);
   return FALSE;

推荐答案

Win32 滚动范围 [
The Win32 Edit control[^] offers these features as standard. If you wish to do it yourself in a plain window then you need to to adjust the scrollranges[^] as you fill the window. When the range of data exceeds the limits of the window, then the scroll bars should appear.


这篇关于动态显示编辑控件滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆