30 x 30 按钮网格
我正在制作一个 30 x 30 按钮的网格,其中 BS_BITMAP 表示一些可以通过单击按钮进行设置的数值。那么我应该在一个窗口上创建 900 个按钮,或者 GDI 可以帮助做同样的事情吗?
关于将网格中某列的行设置为某些值有什么想法吗?我需要一个多维的窗口句柄数组吗?
I'm making a grid of 30 x 30 buttons with BS_BITMAP representing some numeric value which can be set by clicking on buttons. so should I go creating 900 buttons on a window and or GDI would help to do something same?
Any ideas on setting a row of some column in a grid to some values? would I need a multidimensional array of window handles?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
单个窗口上的 900 个控件确实看起来有点过大,戴夫 - 我建议创建一个使用单个窗口的自定义控件,并呈现响应常见事件的类似按钮的对象,而不是用控件使窗口过载。 Windows 可能会抱怨单个窗口上有如此多的控件 - 或者当窗口失效等时执行速度相当慢。
900 controls on a single window does seem a little overkill, Dave - I'd suggest creating a custom control that uses a single window and which renders button-like objects that respond to the usual events, rather than overloading the window with controls. Windows may gripe at having so many controls on a single window - or could perform fairly slowly when the window gets invalidated etc.