C ++ CheckBox检查常量 [英] C++ CheckBox Checked constant

查看:93
本文介绍了C ++ CheckBox检查常量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

这个问题看似微不足道,但却使我头疼不已.我的自定义控件中有4个复选框,用于控制要在图形上显示的子集.当这些CheckBoxes''Checked属性中的任何一个发生更改时,它将触发事件处理程序.

问题是无论CheckBox的初始值是多少,无论事件运行了多少次或UI显示了什么,选中的状态始终返回true或false.这是示例行:

Hello,

This problem seems so trivial, yet it is causing me a big headache. I have 4 checkboxes in my custom control, which I use to control which subsets to show on a graph. When any of these CheckBoxes'' Checked property is changed, it fires an event handler.

The problem is that the checked state always returns true, or false, whatever the CheckBox''s initial value is, no matter how many times the event is run or what the UI shows. Here is a sample line:

int i = System::Convert::ToInt16(vccCheck->Checked);



谢谢您的帮助.



Any help would be appreciated, thanks.

推荐答案

请看一下这篇文章.HTH
在下拉菜单中带有CheckBox的OwnerDraw组合框 [
Please take a look at this article.HTH
An OwnerDraw ComboBox with CheckBoxes in the Drop-Down[^]


这篇关于C ++ CheckBox检查常量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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