我已经使用纯win32 api(无MFC或WPF)在C++中编写了应用程序。 我想要在Windows XP和Windows Vista/Windows 7下运行相同的.exe。为XP和Vista/Windows 7创建Win32应用程序
我正在使用清单向我的应用程序中的控件添加视觉样式。但是,当我在XP机器上测试应用程序时,按钮不显示。只有编辑控件和菜单栏。
编辑:我想我忘记提到这一点,但该应用程序在WIndows 7/Vista上正常工作。 编辑2:我正在使用MinGW编译器 我认为这是一个清单问题,所以我删除它并重新编译我的程序。但按钮仍然不显示。 我使用清单如下:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="*"
name="BlackJack.Viraj"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.2600.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
请问问题出在哪里在清单或者是别的东西吗?
您是否使用了带有UAC护罩的新按钮样式?我不知道XP是否会忽略未知的标志,或者它是不是一个未知的按钮。 – RedX
不,他们都是正常的按钮。 – viraj
你能发布按钮创建的代码吗? – RedX