Windows C ++对话框resizer类 [英] Windows C++ dialog resizer class

查看:124
本文介绍了Windows C ++对话框resizer类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个非常好的对话框resizer类,将拉伸和缩小单个项目,因为屏幕调整大小。 Stephan Keil有一个好的(DlgResizeHelper),它基本上按一定比例调整一切,但我正在寻找更聪明的东西。



例如:




  • 图示不应调整大小


  • 单行文字方块









b

基本上我正在寻找一些东西看看所有的控件,确定一个静态文本字段与一个控件下/下相关,锚定在一起,并调整大型控件在一个智能方式所以看起来不错。



有没有这样的框架吗?我一直在做一个,但现成的东西可能会更好。



后续:我在看建议的解决方案。其中许多需要你去锚点每个控件对话框。我正在寻找聪明的东西,会找出锚点应该是什么,有能力手动锚如果猜测是错误的。似乎应该是可能的 - 大多数人会同意一个静态文本字段旁边的编辑字段应该锚定在一起。猜猜我几乎在寻找一个小AI:)

解决方案

你可以使用wxWidgets。它完全取代了MFC,是多平台的,并提供了一个基于布局的对话机制。


I'm looking for a really good dialog resizer class that will stretch and shrink individual items as needed as the screen is resized. Stephan Keil has a good one (DlgResizeHelper) which basically resizes everything by a set ratio, but I'm looking for something smarter.

For example:

  • Icons should not resize

  • Single-line text boxes should not be stretched vertically

  • Buttons should probably stay the same size

Basically I'm looking for something to look at all of the controls, figure out that a static text field is related to a control next/below it and anchor the two together, and resize large controls in a 'smart' way so it looks good.

Are there such frameworks out there? I've been working on one but something ready-made would probably be better.

FOLLOW UP: I'm looking at the suggested solutions. Many of them require you to go in an anchor each control on the dialog. I'm looking for something smart that will figure out what the anchors ought to be, with the ability to manually anchor if the guesses are wrong. Seems like it should be possible -- most humans would agree a static text field next to an edit field should be anchored together. Guess I'm almost looking for a little AI here :)

解决方案

You can use wxWidgets. It completely replaces MFC, is multi-platform, and gives you a layout-based dialog mechanism.

这篇关于Windows C ++对话框resizer类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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