帮助! -> CPropertySheet的问题 [英] Help! --> Problem with CPropertySheet

查看:53
本文介绍了帮助! -> CPropertySheet的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有一个带有两个CPropertyPages的CPropertySheet,我想更改" CPropertySheet "的背景颜色.我可以使用OnCtlColor更改整个区域的颜色,但可以更改为矩形...!
我在此处放置了一个链接,该链接显示了无色矩形,请查看该链接并告诉我该怎么做: (??

Hi All,
I have a CPropertySheet with two CPropertyPages, I want to change the background color of "CPropertySheet". I can change the color of Whole area with OnCtlColor but a rectangle...!
I put a link Here that shows the uncolored rectangle, Please look at the link and tell me what should I do :( ??

推荐答案

您可以尝试使用CTabCtrl.代替使用CPropertySheetCPropertyPage.

您可以自行检查以更改颜色:
http://support.microsoft.com/kb/179909 [ http://www.codeguru.com/forum/showthread.php?p=862173 [ ^ ]

希望对您有所帮助.
Instead of using CPropertySheet and CPropertyPage you may try CTabCtrl.

You may check this to change the color by yourself:
http://support.microsoft.com/kb/179909[^]

Or this to download a zip file containing an implemention of a colored tab control (go at the bottom of the page to download the zip).
http://www.codeguru.com/forum/showthread.php?p=862173[^]

I hope this helps.


我下载了zip文件,但不适用于基于对话框的项目.我对吗??
I downloaded the zip file, but it is not working for Dialog Based Projects. Am I right ??


最后我能找到解决办法,
对于基于Dialog的项目,在stdafx.h末尾有一些代码应该被注释.以下是这些代码:

#ifdef _UNICODE
#如果已定义_M_IX86
#pragma comment(linker,"/manifestdependency:\" type ="win32" name ="Microsoft.Windows.Common-Controls" version =''6.0.0.0''processorArchitecture =" x86"publicKeyToken = ''6595b64144ccf1df''语言=''*''\")
#elif定义_M_IA64
#pragma comment(linker,"/manifestdependency:\" type ="win32" name ="Microsoft.Windows.Common-Controls" version =''6.0.0.0''processorArchitecture =" ia64"publicKeyToken = ''6595b64144ccf1df''语言=''*''\")
#elif定义_M_X64
#pragma comment(linker,"/manifestdependency:\" type ="win32" name ="Microsoft.Windows.Common-Controls" version =''6.0.0.0''processorArchitecture =" amd64"publicKeyToken = ''6595b64144ccf1df''语言=''*''\")
#else
#pragma comment(linker,"/manifestdependency:\" type ="win32" name ="Microsoft.Windows.Common-Controls" version =''6.0.0.0''processorArchitecture =" *''publicKeyToken = ''6595b64144ccf1df''语言=''*''\")
#endif
#endif

在注释完这些行之后,该矩形的问题将解决,但一个新问题将诞生:(.不幸的是,项目中的所有控件都将更改为Visual .....的旧版本.
我希望我可以更好地解决这个问题.
Finally I could find the solution,
For Dialog based projects, there were some codes at the end of stdafx.h that should be comment. Here are these codes:

#ifdef _UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type=''win32'' name=''Microsoft.Windows.Common-Controls'' version=''6.0.0.0'' processorArchitecture=''x86'' publicKeyToken=''6595b64144ccf1df'' language=''*''\"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:\"type=''win32'' name=''Microsoft.Windows.Common-Controls'' version=''6.0.0.0'' processorArchitecture=''ia64'' publicKeyToken=''6595b64144ccf1df'' language=''*''\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type=''win32'' name=''Microsoft.Windows.Common-Controls'' version=''6.0.0.0'' processorArchitecture=''amd64'' publicKeyToken=''6595b64144ccf1df'' language=''*''\"")
#else
#pragma comment(linker,"/manifestdependency:\"type=''win32'' name=''Microsoft.Windows.Common-Controls'' version=''6.0.0.0'' processorArchitecture=''*'' publicKeyToken=''6595b64144ccf1df'' language=''*''\"")
#endif
#endif

After commenting these lines, problem with that rectangle will solve but a new problem will born :(. unfortunately all controls in the project will change to the older version of Visual....
I wish I could solve this problem in a better way.


这篇关于帮助! -> CPropertySheet的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆