欢迎访问:常州市武进区嘉泽中心小学网站 !今天是:
栏目列表
您现在的位置是:首页>>教师>>计算机技术>>程序设计>>杂项>>文章内容
使用WindowsXP风格的对话框
发布时间:2008-11-20   点击:   来源:本站原创   录入者:佚名
 

使用Windows XP风格的对话框̣

1、插入资源,选择"Custom",输入“24”作为资源的内型。

2、拷贝如下XML脚本到资源编辑器。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly
   xmlns="urn:schemas-microsoft-com:asm.v1"
   manifestVersion="1.0">
<assemblyIdentity
    processorArchitecture="x86"
    version="5.1.0.0"
    type="win32"
    name="test.exe"/>
    <description>Test Application</description>
    <dependency>
    <dependentAssembly>
    <assemblyIdentity
         type="win32"
         name="Microsoft.Windows.Common-Controls"
         version="6.0.0.0"
         publicKeyToken="6595b64144ccf1df"
         language="*"
         processorArchitecture="x86"/>
    </dependentAssembly>
    </dependency>
</assembly>


你可以把脚本中“test.exe”和“Test Application”替换成你想要的名字,这对程序运行没有任何影响。

3、把资源ID设置为1

4、在WinMain()中加入InitCommonControls()语句(如果使用了MFC,请在CApplication::InitInstance()中加入),
不要忘记包含头文件commctrl.h"
5、设置工程,在Link选项中,在Object/Library Modules编辑框中,填入"comctl32.lib"
6、至此你的程序已经具有漂亮的Windows XP对话框了。

附件:
    关闭窗口
    打印文档
    账号登录
    保持登录 忘记密码?
    账号与武进教师培训平台同步