|
本帖最后由 jingyixiaocai 于 2020-1-19 15:37 编辑
程序运行效果:添加单选框,美化窗口
hButton[3] = CreateWindow("BUTTON","减1", WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON,10,160,100,50,hwnd,(HMENU)IDC_BTN4,(HINSTANCE)GetWindowLong(hwnd,GWL_HINSTANCE),NULL);
radioB[0]=CreateWindow("BUTTON","单选框1",WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,10,220,120,30,hwnd,NULL,(HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE),NULL);//创建单选框
radioB[1]=CreateWindow("BUTTON","单选框2",WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,10,260,120,30,hwnd,NULL,(HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE),NULL);//创建单选框
hEdit=CreateWindow("EDIT","编辑框",WS_VISIBLE|WS_CHILD|WS_BORDER|ES_MULTILINE|ES_WANTRETURN,10,300,200,50,hwnd,(HMENU)IDC_Edit,(HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE),NULL);//创建文本框
新建文本文档my.txt
写下
//XP???
#include <windows.h>
1 24 "res\\xpstyle.manifest"
保存后文件名改为my.rc编译
--------------------配置: mingw5 - LIB Debug, 编译器类型: MinGW--------------------
正在编译 C:\Users\Administrator\Desktop\mywnd\my.rc...
完成编译 C:\Users\Administrator\Desktop\mywnd\my.rc: 0 个错误, 0 个警告
生成 C:\Users\Administrator\Desktop\mywnd\mingw5\my.res
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity
name="Xp-Style"
processorArchitecture="x86"
version="5.1.0.0"
type="win32"/>
<description>WindowsXP Shell</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="x86"
publicKeyToken="6595b64144*F1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
这就是xpstyle.manifest的内容 晕了,我也不会只能调用,
有大神出来解析一下吗?该个win10的
我想让窗口是win10样式
附上源代码:
mywnd.zip
(216.41 KB, 下载次数: 8)
|
|