对话框外观
我正在编写一个 C++ 应用程序,并且有一个显示在常规对话框框架中的登录框。我发现有些人可以对整个对话框进行 SKIN,并使其看起来非常漂亮。我想知道是否有人可以给我一些关于如何做到这一点的指示。
I am writing a C++ application and I have a Login Box that's shown in a regular Dialog Box Frame. I see that some people can SKIN the entire dialog box and makes it look really nice. I was wondering if anyone can give me some pointers as to how to do that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我需要更多细节才能给你一个好的答案。
答案很大程度上取决于您使用的操作系统以及您如何对 GUI 进行编程(例如在 Windows 上 - 普通 Win32、MFC、ATL、Qt、Windows Forms、WPF 等)。
如果您只是使用 Windows API,这里有一个可以帮助您入门的链接。
http://www.codeproject.com/KB/dialog/skinstyle.aspx
请注意:如果您想要自定义每个控件的外观,那么自定义皮肤对话框可能是一项非常艰巨的任务,因为您最终要编写非常复杂的自定义控件。
或者,您是否只想确保对话框以 Windows XP 视觉风格而不是 XP 之前的风格显示?这将需要更改您的应用程序以使用新的通用控件和视觉样式。请注意,这会更改某些 Windows API 的行为,并且可能会产生副作用(请参阅 ISOLATION_AWARE_ENABLED)。
I'd need more details to give you a good answer.
The answer very much depends on which OS you're using and how you're programming your GUI (for example on Windows - plain Win32, MFC, ATL, Qt, Windows Forms, WPF etc etc).
If you're just using the Windows API here's a link to get you started.
http://www.codeproject.com/KB/dialog/skinstyle.aspx
Beware: custom skinning dialog boxes can be a very large task if you want to customise the look of every control as you end up writing very complicated custom controls.
Alternatively do you just want to make sure that your dialogs appear with Windows XP visual style rather than pre-XP style? This will require changes to your application to use the new common controls and visual style. Note that this changes the behaviour of some Windows APIs and can potentially have side effects (see ISOLATION_AWARE_ENABLED).