我想在IDC_EDIT框中输入内容. 输入完后不需要按其它键. 程序就自动获取框内的内容.所以我添加了EN_CHANGE事件处理. 把要执行的代码都放在了OnEnChangeEdit1()中.可现在问题是当我只输入一个字符时它就执行程序了. 还没等我输入完. 所以我想能不能有什么方法让他等待1,2秒.再执行? 我在函数里开了线程用了sleep等等方法都不行. 一执行到等待时程序就像死掉了. 没法输入余下的内容.请指教下. 我用的VS2008
调试欢乐多
PS:定时的方法绝对不可取。你怎么知道用户输入的速度呢?所以我觉得这更多的不是一个技术问题,而是一个设计问题。
Sent when the user has taken an action that may have altered text in an edit control. Unlike the EN_UPDATE notification message, this notification message is sent after the system updates the screen. The parent window of the edit control receives this notification message through a WM_COMMAND message.