CComBo的用法
在CComBo控件中可以通过SetCurSel(int index) 这个函数定位下拉列表框默认显示那条条目,但是我想问CComBo这个控件中有相应的函数没有,通过定位字符串来让列表框默认显示那个条条目,比如CComBo m_Com ; m_Com.XXX("名字") ,默认情况下显示该名字的条目。 控件 CComBo
[解决办法]
好像没有,不过你自己可以封装这样功能的函数啊
[解决办法]
SelectString 不就是你要的接口...
Searches for a string in the list box of a combo box, and if the string is found, selects the string in the list box and copies it to the edit control.
[解决办法]
SelectString(-1,"要设置的内容") 这样使用
返回值:
The zero-based index of the selected item if the string was found. If the search was unsuccessful, the return value is CB_ERR and the current selection is not changed
[解决办法]
CComboBox::FindString()/SetCurSel();