如何让我的应用程序中使用Windows主题?

如何让我的应用程序中使用Windows主题?

问题描述:

我与一些窗口API努力营造一个小的应用程序。
我已经创建了按钮,窗口,好吧。

I'm working with some windows API to create a little application. I already created the buttons, windows, alright.

但问题是我创建不喜欢看的OS主题的组件。他们看起来很简单:

But the problem is the components I created don't look like the OS theme. They look very simple:

查看按钮为例。

我如何启用Windows主题?它可以在C或德尔福。

How do I enable the Windows theme? It can be in C or Delphi.

有关使用Windows控件的应用程序,即在的这个MSDN文章

For an application using windows controls, that is documented in this msdn article

编辑:为了使长话短说,Windows需要知道一个应用程序,如果它的目的是使用新样式的控件。一些老的应用程序就是不能与新的皮肤看起来XP及更高版本兼容。因此,每个exe文件应该是在一个清单,在可执行的嵌入式XML文件兼容的版本声明。清单用于其他像宣称你是什么,或者不符合(DLL版本,120 DPI)以及免注册COM兼容。

To make a long story short, Windows needs to know for an application if it was intended to use the new style controls. Some older apps just aren't compatible with the new skinned looks of XP and later. Each exe should therefore declare with which version it is compatible in a manifest, an embedded xml file in the executable. The manifest is used for other things like declaring what you are or aren't compatible with (DLL versions, 120 dpi) as well as registration-free com.