如何在窗口上显示超过50个按钮? [英] How to show more than 50 push buttons on a window?
问题描述
我创建了一个Window,然后在这个Window上创建了50个按钮,但我只能在窗口看到10个按钮。由于我无法向下滚动窗口,所以休息是不可见的。
我添加了自动滚动到窗口添加
WS_VSCROLL | WS_HSCROLL | ES_AUTOVSCROLL | ES_AUTOHSCROLL
到 Window Style参数 CreateWindowEx
功能。通过这样做,我可以看到窗口上的滚动但这个滚动不可移动。
将自动滚动添加到窗口的可能和简单的解决方案是什么为了在这种情况下看到所有50个按钮。
I have created a Window and then, created 50 buttons on this Window but I can only see 10 buttons on my window. Rest are out of view since I am not able to scroll the window down.
I have added auto scroll to window by adding
WS_VSCROLL | WS_HSCROLL | ES_AUTOVSCROLL | ES_AUTOHSCROLL
to Window Style parameter of CreateWindowEx
function. By doing this, I can see a scroll on the window but this scroll is not movable.
What is the possible and simple solution to add a auto scroll to window in order to see all the 50 buttons in such a situation.
推荐答案
在这种情况下,短语自动滚动没有意义。您是否使用对话框或表单进行此操作尚不清楚。如果是对话框,则没有滚动。如果是一个表单,那么内置滚动(实际上你必须做一些事情来删除它)。听起来你正在对话框中实现这一点。您可能需要更改基本应用程序类型。擦除代码并重新开始可能会更容易,使用表单界面创建标准应用程序。
The phrase "auto scroll" does not make sense in this context. It is not clear if you are doing this with a dialog or a form. If it is a dialog, there is no scrolling. If a form, then scrolling is built in (actually you have to do a few things to remove it). It sounds like you are implementing this on a dialog. You likely need to change your basic application type. It would likely be easier to scrub your code and start over, creating a standard application with a form interface.
这篇关于如何在窗口上显示超过50个按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!