MFC Radio Button 使用 分组 RadioButton 用法
来源:互联网 发布:安卓打开java闪退 编辑:程序博客网 时间:2024/05/16 23:45
1.环境:VS2010
2. 分组
将radio1、radio2、radio3分为1组,radio4、radio5分为另一组;
方法:设置 radio1 的 属性: group、tabstop、auto均为true
设置 radio2 的 属性: group设为false, tabstop、auto均为true
设置 radio3 的 属性:group设为false, tabstop、auto均为true
设置 radio4 的 属性: group、tabstop、auto均为true
设置 radio5 的 属性: group设为false,tabstop、auto均为true
3. 按CTRL+D,保证同一组内的radio的tab序号是连续的;调整tab序号的方式是:鼠标点击数字,比如先点3,然后点7,则3和7会交换,即radio1变为7,radio5变为3;
4. 关联int型变量 注意:只需将group属性为true的radio1关联,radio2和radio3无需关联; 同样,radio4需关联,radio5无需关联
5. 第4步完成后,在窗体头文件中可以看到
构造函数:
默认第一个radio被选中,即radio1被选中
6. 事件处理
设置radio1的事件
设置radio2和radio3的点击事件函数 和 radio1 相同
事件代码:
注意:updatedata(true) 不能少; 它的作用是 将radio的状态值更新给关联的变量,即m_radiobtngroup1;
感谢关注,欢迎交流!
0 0
- MFC Radio Button 使用 分组 RadioButton 用法
- MFC Radio Button 使用 分组 RadioButton 用法
- MFC Radio Button 使用 分组 RadioButton 用法
- MFC Radio Button 使用 分组 RadioButton 用法
- MFC Radio Button 使用 分组 RadioButton 用法
- MFC Radio Button 使用 分组 RadioButton 用法
- MFC Radio Button 使用 分组 RadioButton 用法
- MFC Radio Button 使用 分组 RadioButton 用法
- MFC Radio Button 使用 分组 RadioButton 用法
- MFC Radio Button 使用 分组 RadioButton 用法
- MFC Radio Button 使用 分组 RadioButton 用法
- Radio Button 使用分组 RadioButton 用法
- MFC Radio Button 使用 分组
- MFC分组Radio Button的使用
- MFC Radio Button的分组
- MFC RADIO button 使用
- MFC -- radio button 的用法
- MFC -- radio button 的用法
- 《JAVA 核心技术 基础知识》 第十章 笔记
- lodash 中文学习拾零之Array篇
- UI 19 数据库
- [leetcode] 141.Linked List Cycle
- 一句SQL语句,可能就是一个定时炸弹
- MFC Radio Button 使用 分组 RadioButton 用法
- Android 自定义弹窗 Dialog
- 理解Python中的with…as…语法
- 并发与竞态
- 循环-02. 计算圆周率(15)
- 0009.Scala内部类
- 【ssh】Ibatis代码自动生成工具(项目)——Abator安装与应用实例(图解)
- C程序设计----结构体
- 比较两个路径下DLL版本并出力CSV