[已解决]将comboBox(Drop List)设置为空白 [英] [Solved] set comboBox(Drop List) as blank

查看:79
本文介绍了[已解决]将comboBox(Drop List)设置为空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我从下拉列表中设置comboBox的值,现在我想在按钮单击事件中将ComboBox设置为空白值.我将组合框的类型"属性更改为删除列表".解决方案是什么?

First I set the value of comboBox from the drop list, now I want to set ComboBox as blank value on button click event. I have change the "Type" property of combo box as Drop List. What is the solution?

推荐答案

yourComboBox.SetCurSel(-1);
//or
((CComboBox*)GetDlgItem(IDC_YOUR_COMBO))->SetCurSel(-1);


这篇关于[已解决]将comboBox(Drop List)设置为空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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