RichEditCtrl used in chatting

I wanted an editbox that can be used in chatting.
Every chat message was inserted after the last message, user name and message is distincted with another color and message has to have readonly attribute.
After all, If the message is full of the edit box, the view is autoscrolled upward.
To Use the CDalsuRichEdit...

  1. Copy "DalsuRichEdit.h", "DalsuRichEdit.cpp" in your work directory
  2. Add your project these two files
  3. Add a member data ex:m_pDalRich or m_pDalRich
  4. Create the CDalRichEdit's Window with suitable style
The Description of member functions
  1. AddName(CString &strName, COLORREF &crColor);
    Specify the User Name and its color

  2. AddText(CString &strTextIn, COLORREF &crColor);
    Specify text string and its color
    Don't forget! There are "\r\n" characters on the tail of this string.

  3. AddMsg(CString &strMsg, COLORREF &crColor, BOOL bUnderLine, BOOL bBold);
    It's general system message. ex:A User joined this room...
    In the same manner, there are "\r\n" characters on the tail of this string.
and I thank for Zafir Anjum, Tom Moor, Steve Dunn, Juraj Rojko 's codes...

Download demo project - 37 KB

Date Posted: 01/14/99