void CSpinbuttonDlg::OnChangeEdit1()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
char buffer[3];
//memset(buffer,0,3);
UpdateData();
m_edit1.GetLine(0,buffer);
int pos=atoi(buffer);
m_progress1.SetPos(pos);
}
当不把//memset(buffer,0,3)当成注释行时,progress控件就不响应了,插入断点也没用,不知道这是怎么回事。
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
char buffer[3];
//memset(buffer,0,3);
UpdateData();
m_edit1.GetLine(0,buffer);
int pos=atoi(buffer);
m_progress1.SetPos(pos);
}
当不把//memset(buffer,0,3)当成注释行时,progress控件就不响应了,插入断点也没用,不知道这是怎么回事。
解决方案 »
- 获取Windows server backup的备份日志信息
- 内存使用不断增加,然后就出错
- 怎么统计单位时间内的网络流量啊...急!求助...
- 有游戏开发经验的高手请进,关于棋牌类游戏的算法问题!
- CString的问题, 第一次调用正常, 第二次调用FreeData错! 百思不得其解!
- 用DAO访问Access数据库,为什么在没有安装VC的机子上就会出现“无法对DAO/jet db引擎进行初始化”。
- 新手,有几个问题想问问??
- 奇怪的问题出现在DrawItem中的内存DC,在线等待
- 多线程,堆,栈,参数的传递。有一些不明白的地方。
- 哪里有InstallShield Professional的注册码和东方语言包??
- LoadIcon(hInstance,"ziyuanmingcheng");装载不成功?咋解决啊!
- 小问题,请高手解决
int pos=atoi(m_edit1);
建议把char buffer[3]数组改大些.
Call this function to retrieve a line of text from an edit control and places it in lpszBuffer. The copied line does not contain a null-termination character.
UpdateData();
int nLength = m_edit1.GetLine(0,buffer);
buffer[nLength] = '\0';
int pos=atoi(buffer);
m_progress1.SetPos(pos);