请教一个关于Combo Box的问题
如果Type 设为Dropdown,则可通过SetWindowText()来设置Combo Box的编辑框的内容,但用户可更改框中的内容。
若将Type 设为Drop List(这是我需要的),则不能通过SetWindowText()来设置Combo Box的编辑框的内容,有没有其他函数?
谢谢!
如果Type 设为Dropdown,则可通过SetWindowText()来设置Combo Box的编辑框的内容,但用户可更改框中的内容。
若将Type 设为Drop List(这是我需要的),则不能通过SetWindowText()来设置Combo Box的编辑框的内容,有没有其他函数?
谢谢!
m_combo.AddString("美国");
..........
//选择第几个
m_combo.SetCurSel(输入你的数字);
//得到当前选择的字串
CString str;
m_combo.GetWindowText (str);
//得到任意一项字串
int GetLBText(int nIndex,LPTSTR lpszText) const;m_combo.GetLBText (2,str);//是得到第三个的字串,都是从0开始记数的