WinAPI 控件换肤

发布于 2024-10-09 10:34:02 字数 415 浏览 6 评论 0 原文

如果您曾经见过 Adob​​e Creative Suite 5 (CS5) 中的应用程序,您可能会注意到它看起来不像本机 Windows GUI。他们已对其进行了修改,使其具有不同的外观。

人们会从哪里开始制作具有自定义皮肤的应用程序? CS5 使用 Adob​​e Source 库进行小部件/控件管理,因此我尝试下载并编译 Adob​​e Source Library,看看是否可以制作一个像 Photoshop CS5 一样漂亮的皮肤应用程序,但在最终对其进行编译和测试后,我意识到该库仅用于管理小部件,而不是像 CS5 那样为 GUI 换肤。

我应该从哪里开始制作像 Adob​​e Cs5 应用程序这样的漂亮皮肤程序?有人能指出我正确的方向吗?

我是否只需使用 WinAPI 中的 WM_PAINT 消息并使用 openGL 或其他方式渲染我自己的小部件?

If you've ever seen an application in the Adobe Creative Suite 5 (CS5), you may have noticed that it doesn't look like the native Windows GUI.. They have modified it to have a different look to it.

Where would someone begin to make an application that has a custom skin? CS5 uses the Adobe Source library for it's widget/control management, so I tried downloading and compiling the Adobe Source Library to see if I could make a nice skinned app like Photoshop CS5, but after finally getting it to compile and tested it, I realized the library was only for managing widgets and not skinning the GUI, like CS5 has.

Where would I begin to make a nice skinned program like Adobe Cs5 applications? Can anyone point me in the right direction?

Do I simply use the WM_PAINT Message from WinAPI and render my own widgets using openGL or something?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

清醇 2024-10-16 10:34:02

使用 QT 和 QML。它没有陡峭的学习曲线。您可以使用 JavaScript 定义 GUI 并添加大量效果,并享受在您能想象到的每件事中使用 PNG 的乐趣。然后,您可以使用 C++ 来完成应用程序逻辑。事实上,除了 UI 之外,您还可以使用 QML 做一些相当高级的事情,但最好一如既往地分离关注点。

我在工作中使用它来发布产品。重写 WM_PAINT 并不是 Windows 中的唯一方法,但在自定义绘制 UI 时,我强烈推荐 QT 而不是 Win32 API。至少根据我的经验,这比我使用 Win32 API 的冒险要容易得多。

Use QT and QML. It doesn't have a steep learning curve. You define your GUI with JavaScript and add lots of effects and enjoy using PNGs in every single thing you can imagine. Then you do your application logic with C++. In fact you can do some fairly advanced things other than UI with QML but it's better to seperate concerns as always.

I use it at work for a product to be released. Overriding WM_PAINT is not the only way in Windows but I strongly recommend QT instead of Win32 API when it comes to custom drawn UI. At least to my experience, it is way easier than my adventures with Win32 API.

醉生梦死 2024-10-16 10:34:02

如果你想自己实现自定义控件,你需要实现自己的WM_PAINT并使用GDI/GDI+进行绘制。对于顶级窗口和弹出窗口,您可以使用 分层窗口。但我认为如果您不想自己实现,您可以在互联网上以合理的价格找到很多专业的自定义控件。

If you want to implement custom controls by yourself, you need to implement own WM_PAINT and draw with using GDI/GDI+. For toplevel windows and popups you can use Layered windows. But I think you can find a lot of professional custom controls over internet for reasonable price if you don't want to implement by yourself.

春风十里 2024-10-16 10:34:02

我认为您创建现代皮肤应用程序的选择是: QTWPF(通过 C++/CLI)。

I think your choices re creating a modern skinned app are: QT or WPF (via C++/CLI).

静若繁花 2024-10-16 10:34:02

如果您有现有的 Win32 API 应用程序,并且不想使用支持换肤的库重写它,您可能需要查看 Stardock DirectSkin

如果您决定重写您的应用程序,我也会推荐 Qt。 Guitar Pro 6 是使用 Qt 重写的,了解更多关于他们的经验 此处

If you have an existing Win32 API application and you do not want to rewrite it using a library that supports skinning you might want to have a look at Stardock DirectSkin.

If you decide to rewrite your application I would also recommend Qt. Guitar Pro 6 was rewritten using Qt, read more about their experience here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文