Skip to main content
gamedev.net
🔒 Locked

strange error...

Started by BouncePup Jul 23, 2002 at 6:47 PM 2 replies 300+ views
Original Post
BouncePup
BouncePup
I''m using the following code to insert & format text into a Subclassed richedit ctrl.. ********** int iTotalLen = GetWindowTextLength(); SetSel(iTotalLen, iTotalLen); ReplaceSel(szData); int iStartPos = iTotalLen; CHARFORMAT cf; cf.cbSize = sizeof(CHARFORMAT); cf.dwMask = CFM_COLOR | CFM_UNDERLINE | CFM_BOLD; cf.dwEffects = (unsigned long) ~( CFE_AUTOCOLOR | CFE_UNDERLINE | CFE_BOLD); cf.crTextColor = crColor; int iEndPos = GetWindowTextLength(); SetSel(iStartPos, iEndPos); SetSelectionCharFormat(cf); HideSelection(TRUE, FALSE); LineScroll(1); ********** Yet this seems to happen when I insert data into the control using the above code: -=IMG=- www.dyaus.com/weird1.jpg Any ideas on either how to fix it or how to do it properly? Regards, Nate Strandberg
"Always forgive your enemies, nothing annoys them more.."
BouncePup
BouncePup
Yeah.. If I take out the new line ("\n") it colorizes it fine..

Any idea how to properly count everything?

-Nate
"Always forgive your enemies, nothing annoys them more.."

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.