如何在vc6.0环境下,将其按纽xp化,有个文件叫什么"12"忘了.
添加在资源中的.
添加在资源中的.
解决方案 »
- 关于API初学的问题
- 我用SHGetSetSettings显示所有的文件和隐藏的系统文件。现在可以显示所有文件了,但系统文件却显示不出来,为什么?
- 谁有GetItemData()和SetItemData()的具体例子?
- VC中如何直接将datagri控件里的数据导出到excel(在线等!!!!)
- 放分,顺便问个极度郁闷的问题
- 请教: 如何使应用程序的各个线程拥有DLL中的全局变量的本地备份
- 请教关于从VC中申请CA证书的问题,困扰了很久,急!
- 简单
- 初学vc的问题,急盼赐教!!!
- 求助: PE文件和NE文件的分别处, segment table 和 section table 概念不同?
- 高分求 com原理与应用 电子书, 注意不是附书源码
- afxsock.h和winsock2.h运行时产生冲突如何解决!
-----------------------------------------------
MyCSDN 免费版 - http://community.csdn.net/Expert/TopicView1.asp?id=4608614
so if you have ,sent it to me ,thank you very much !
my email :[email protected]
-----------------------------------------------
MyCSDN 免费版 - http://community.csdn.net/Expert/TopicView1.asp?id=4608614
Microsoft has introduced a new type of resource called Manifest. Well, technically it's not a type of resource; it is just an XML file included to the app as a custom resource with ID=1, which describes the application and its dependencies. If an executable file contains this resource, Windows XP will identify it and force the application to use the specific versions of libraries. Our goal is to enforce usage of new Windows Common Controls library (version 6).Here is an example of a simple manifest file that I've used to solve this task:<?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="X86"
name="Microsoft.Windows.YourApplication"
type="win32"
/>
<description>YourApplication</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>Create a file with its contents as shown above in the project resources folder (res by default). Replace YourApplication with an appropriate name. That should do it for our case. For further information about manifest files, see the MSDN for Visual Studio .NET.2. Add a Resource to the .rc File
First, let's add two lines to the resource.h file. Just copy and paste the following:#define IDR_MANIFEST 1
#define RT_MANIFEST 24Now, open the application custom resource file. Usually, it's located in the res directory; the default extention is .rc2. Manually add the following line:// Add manually edited resources here...
IDR_MANIFEST RT_MANIFEST MOVEABLE PURE
"res\\ApplicationManifestXMLFile"Replace ApplicationManifestXMLFile with the actual file name.3. Modify the InitInstance Method
It's really simple. Just copy and paste two calls at the beginning of the InitInstance method:BOOL MoneyApp::InitInstance()
{
InitCommonControls(); // initialize common control library
CWinApp::InitInstance(); // call parent class method#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a
// shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC
// statically
#endif // the rest of the code
}4. Conclusion
This is it. No magic, but it works. You've got all the dialog controls, menus, and toolbars looking like their brothers and sisters in native XP applications. You can still develop under Windows 2000, but now I know that the UI of your applications will have a nice look under XP.
http://www.edacn.net/bbs/get.php?id=23516