相对于变量值的颜色变化(使用任何控制) [英] Color change (in using any control) with respect to variable value

查看:73
本文介绍了相对于变量值的颜色变化(使用任何控制)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个对话框应用程序,其中我的软件与硬件进行通信
和硬件将给我一些确认,我将该确认值与我当时的应用程序中的某个变量进行比较是一个然后我必须在对话框中显示绿色如果它是0然后我必须显示红色所以颜色取决于变量值所以我该怎么做。请帮助我

或者给我一些伪代码或链接,我可以通过它来完成我的工作......请







[更新]

对不起我不想改变对话框颜色我想改变图片控件颜色相对于变量值的变化。我在使用它时就像一个指示器变量值是1然后是绿色,当0然后是红色,请先生请告诉我任何其他答案,请...



我无法得到您的任何回复方......请帮帮我...



[更新]直到现在没有人回复,请任何机构帮助我请紧急,请,请...



[已更新31-12-12]

直到现在我没有得到任何人的任何回复如果有人知道请帮助我......紧急..

I am developing a dialog application in which my software is communicate with hardware
and hardware will give me some acknowledgement and I compare that acknowledgement value with some variable in my application at that time if the value is one then I have to display in dialog box GREEN color if it is 0 then I have to display RED color so the color is depending upon the variable value so how can I do that.Please help me
or give me some pseudo code or link by which I can able to do my job..Please please



[Updated]
Sorry I do not want to change the dialog box color I want to change the picture control color with respect to change of the variable values.I am using this like a indicator when variable value is 1 then green and when 0 then red,Sir please please tell me any other answer,please please ...

I can not get any response from your side...Please help me ...

[Updated] Till now nobody response,Please any body help me Please its urgent,Please,please ...

[Updated 31-12-12]
Till now I do not get any response from any one if anybody know please help me..its urgent..

推荐答案

更改MFC对话框这里描述了颜色,最后有一些代码示例:

http://msdn.microsoft.com/en-us/library/6skhh669%28v=vs.80%29.aspx [ ^ ]。



关于变量值......它取决于类型..,考虑使用 if 语句。 :-)



-SA
Changing of the MFC dialog color is described here, with some code sample at the end:
http://msdn.microsoft.com/en-us/library/6skhh669%28v=vs.80%29.aspx[^].

As to the "variable value"... it depends on the type.., consider using if statement. :-)

—SA


这篇关于相对于变量值的颜色变化(使用任何控制)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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