关于VC6.0界面MFC设置成XP风格问题【可以变得更加好看】
最近在做一个串口通讯的程序VC6.0实现界面如下(非XP风格):
通过在WINAPI交流群中的讨论,由 “空城梦。(726460675)” 网友告知,在工程中的.rc文件,以记事本打开,在最后加上以下代码:
///////////////////////////////////////////////////////////////////////////// // // 24 // 1 24 DISCARDABLE BEGIN 0x3f3c, 0x6d78, 0x206c, 0x6576, 0x7372, 0x6f69, 0x3d6e, 0x3122, 0x302e, 0x2022, 0x6e65, 0x6f63, 0x6964, 0x676e, 0x223d, 0x5455, 0x2d46, 0x2238, 0x7320, 0x6174, 0x646e, 0x6c61, 0x6e6f, 0x3d65, 0x7922, 0x7365, 0x3f22, 0x203e, 0x0a0d, 0x613c, 0x7373, 0x6d65, 0x6c62, 0x2079, 0x0a0d, 0x6d78, 0x6e6c, 0x3d73, 0x7522, 0x6e72, 0x733a, 0x6863, 0x6d65, 0x7361, 0x6d2d, 0x6369, 0x6f72, 0x6f73, 0x7466, 0x632d, 0x6d6f, 0x613a, 0x6d73, 0x762e, 0x2231, 0x0d20, 0x6d0a, 0x6e61, 0x6669, 0x7365, 0x5674, 0x7265, 0x6973, 0x6e6f, 0x223d, 0x2e31, 0x2230, 0x0d3e, 0x3c0a, 0x7361, 0x6573, 0x626d, 0x796c, 0x6449, 0x6e65, 0x6974, 0x7974, 0x0d20, 0x700a, 0x6f72, 0x6563, 0x7373, 0x726f, 0x7241, 0x6863, 0x7469, 0x6365, 0x7574, 0x6572, 0x223d, 0x3878, 0x2236, 0x0d20, 0x760a, 0x7265, 0x6973, 0x6e6f, 0x223d, 0x2e35, 0x2e31, 0x2e30, 0x2230, 0x0a0d, 0x7974, 0x6570, 0x223d, 0x6977, 0x336e, 0x2232, 0x0a0d, 0x616e, 0x656d, 0x223d, 0x6574, 0x7473, 0x652e, 0x6578, 0x2f22, 0x0d3e, 0x3c0a, 0x6564, 0x6373, 0x6972, 0x7470, 0x6f69, 0x3e6e, 0x6554, 0x7473, 0x4120, 0x7070, 0x696c, 0x6163, 0x6974, 0x6e6f, 0x2f3c, 0x6564, 0x6373, 0x6972, 0x7470, 0x6f69, 0x3e6e, 0x0a0d, 0x643c, 0x7065, 0x6e65, 0x6564, 0x636e, 0x3e79, 0x0a0d, 0x643c, 0x7065, 0x6e65, 0x6564, 0x746e, 0x7341, 0x6573, 0x626d, 0x796c, 0x0d3e, 0x3c0a, 0x7361, 0x6573, 0x626d, 0x796c, 0x6449, 0x6e65, 0x6974, 0x7974, 0x0a0d, 0x7974, 0x6570, 0x223d, 0x6977, 0x336e, 0x2232, 0x0a0d, 0x616e, 0x656d, 0x223d, 0x694d, 0x7263, 0x736f, 0x666f, 0x2e74, 0x6957, 0x646e, 0x776f, 0x2e73, 0x6f43, 0x6d6d, 0x6e6f, 0x432d, 0x6e6f, 0x7274, 0x6c6f, 0x2273, 0x0a0d, 0x6576, 0x7372, 0x6f69, 0x3d6e, 0x3622, 0x302e, 0x302e, 0x302e, 0x0d22, 0x700a, 0x6275, 0x696c, 0x4b63, 0x7965, 0x6f54, 0x656b, 0x3d6e, 0x3622, 0x3935, 0x6235, 0x3436, 0x3431, 0x6334, 0x6663, 0x6431, 0x2266, 0x0a0d, 0x616c, 0x676e, 0x6175, 0x6567, 0x223d, 0x222a, 0x0a0d, 0x7270, 0x636f, 0x7365, 0x6f73, 0x4172, 0x6372, 0x6968, 0x6574, 0x7463, 0x7275, 0x3d65, 0x7822, 0x3638, 0x2f22, 0x0d3e, 0x3c0a, 0x642f, 0x7065, 0x6e65, 0x6564, 0x746e, 0x7341, 0x6573, 0x626d, 0x796c, 0x0d3e, 0x3c0a, 0x642f, 0x7065, 0x6e65, 0x6564, 0x636e, 0x3e79, 0x0a0d, 0x2f3c, 0x7361, 0x6573, 0x626d, 0x796c, "\076" END
然后重新编译运行出来的demo果然是XP风格的,非常美观。
感谢网友 空城梦。(726460675)