Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3046

SetSel scrolls CEDit - I can't stop it

$
0
0
Hello all,

I'm attempting to use SetSel to append text to the end of the existing text in a CEdit control, but I don't want it to scroll to the bottom.

I have tried this:

int nLength = SystemMessageEdit.GetWindowTextLength();
SystemMessageEdit.SetSel(nLength, nLength, TRUE);
SystemMessageEdit.ReplaceSel(CString(text.c_str()));

As shown, I set the last parameter of SetSel to TRUE, but it still scrolls.

I have tried a few janky workarounds, but causes flickering. How do I stop the scrolling?

I'm happy to provide more information, but I don't know what else is applicable. :(

Thank you in advance.

-p

Viewing all articles
Browse latest Browse all 3046

Trending Articles