問題描述
根據文檔:
如果您希望應用程序使用 ComCtl32.dll 版本 6,則必須添加應用程序清單或編譯器指令,以指定應使用版本 6(如果可用)."
"If you want your application to use ComCtl32.dll version 6, you must add an application manifest or compiler directive to specify that version 6 should be used if it is available."
注意到上面的邏輯 OR 了嗎?那么這個神秘的編譯器指令是什么?
Notice the logical OR above? So what is this mysterious compiler directive?
我有一個完全包含在單個 .cpp 文件中的本機 Win32 C++ 應用程序.沒有資源文件、清單文件等.我想保持這種狀態,但我也想使用視覺樣式.
I've got a native Win32 C++ application that is wholly contained in a single .cpp file. There are no resource files, manifest files, etc. I'd like to keep it that way, but I would also like to use visual styles.
推薦答案
如果您使用的是 Visual Studio,則可以將此行添加到您的 stdafx.cpp 中,例如:
If you're using Visual Studio, you can add this line to your stdafx.cpp for example:
#pragma comment(linker,""/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"")
這篇關于如何在沒有清單的情況下啟用視覺樣式的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!