The following snippet is from the OnChange() handler of a multiline CEdit control, which has "WantReturn" set.
void DLG::OnChangeEditPrepareTape()
{
CString ss;
std::vector<char> aTape;
m_prepareTape.GetWindowText(ss);
m_prepareTape.SetWindowText(ss);
}
If the SetWindowText() is commented out, the user’s text builds up on the right, and all is well. But, with it in, the text insertion point moves to the left edge, and the user’s characters go in to the left of the existing characters..
I want to put some tinkering text between the two calls, and can get what I want by subclassing CEdit. But I’d be interested to know if there is a way of doing it by Get() & Set().
I’m using Visual C++ 6, with Service Pack 5. Eleven years old now, but then “Software does not wear out” as they say:-).