EM_GETLINE fails when Spy++ is running
There is an edit box in some dialog in my application, which is running on Windows XP. When I issue EM_GETLINE on this control, it returns its contents and it's ok, but when I start Spy++ the control suddenly sta开发者_如何学Gorts behaving incorreclty and always returns an empty string. What might be a problem?
The problem was in a buffer size. Win200 thinks that 1 byte is good enough to return the text inside the control, but WinXP thinks that the buffer must be at least two bytes long.
精彩评论