谁能告诉我为什么 MFC 应用程序无法在 Windows 7 基本主题中正确显示?
编辑:有没有人能猜出问题所在?
编辑:
- 我使用的是 vs2008(创建此应用程序时使用了相同的版本)。
- 这个特定的窗口是基于 DLL 的。为了创建那个 DLL,我在 Stdafx.h 中添加了这些
.
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
- 此问题仅出现在该窗口中。
- 这个窗口基于 CDialog,在 OnInitDialog() 中我正在做这些,
.
CDialog::OnInitDialog();
AfxInitRichEdit();
// And Create three more child windows.
- 这是它在基本主题中的显示方式。
但是,当我更改为 Windows Aero 主题时它运行良好。
应该怎么解决?
编辑:有人愿意吗?
最佳答案
- 建议在 Application 类的 InitInstance 函数中初始化 richedit 控件。我不确定它能否与 OnInitDialog 一起正常工作。
- 从项目设置中检查您的程序/DLL 是否为 UNICODE 代码。
- 默认情况下,Visual Studio 2008 将为程序(EXE)生成 list 。
- 仅当应用程序是 UNICODE 时才必须嵌入 list 。
请检查这个。
关于c++ - Windows 7基本主题上的MFC控件隐藏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6256240/