我在VC++6.0环境下,做了一个对话框,在这个对话框上加了一个下拉框,并把它的属性设置成dropdown,可以编辑这个框,定义为 COMBO 变量 m_Combo_Customer,我怎样获取我选择这个下拉框中的变量值或者输入的编辑内容,我用
CString Customer;
Customer=m_Combo_Customer.GetWindowText()
不能通过编译,说Customer=m_Combo_Customer.GetWindowText()不能为0参数, m_Combo_Customer.GetWindowText()扩号中的参数是&Cstring 的,我要怎样改
CString Customer;
Customer=m_Combo_Customer.GetWindowText()
不能通过编译,说Customer=m_Combo_Customer.GetWindowText()不能为0参数, m_Combo_Customer.GetWindowText()扩号中的参数是&Cstring 的,我要怎样改
解决方案 »
- VC如何调用JAVA webService ?
- VC调试器能抓住的first chance exception一定是SEH吗,标准C++的异常呢?
- 本机收不到多播消息问题
- 单文档程序中如何做一个公用的函数被调用?
- 谁有“对象的艺术” ( the art of objects) 这本书啊?
- 请问用BoundsChecker能不能检测DLL的错误,怎么检查??
- 急!!为什么在asp com中使用FindWindow()一直返回NULL???
- 要做CAD二次开发了,老大们给点资料先?ZKS.
- VC 的CHART 控件 怎么注册不了
- Release版本的问题
- 被困扰了几天,请教DCOM安全性问题?
- 想请教一个问题,怎么样读取经过软件狗加密的并行口的数据?
m_Combo_Customer.GetWindowText(&st);
extern CComboBox* pmyComboBox;// Dump all of the items in the combo box.
#ifdef _DEBUG
CString str, str2;
int n;
for (int i=0;i < pmyComboBox->GetCount();i++)
{
n = pmyComboBox->GetLBTextLen( i );
pmyComboBox->GetLBText( i, str.GetBuffer(n) );
str.ReleaseBuffer(); str2.Format(_T("item %d: %s\r\n"), i, str.GetBuffer(0));
afxDump << str2;
}
#endif因为是dropdown,取得当前所选用GetCurSel