Virtual Developer Workshop: Containerized Development with Docker
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...
- Copy "DalsuRichEdit.h", "DalsuRichEdit.cpp" in your work directory
- Add your project these two files
- Add a member data ex:m_pDalRich or m_pDalRich
- Create the CDalRichEdit's Window with suitable style
- AddName(CString &strName, COLORREF &crColor);
Specify the User Name and its color
- 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.
- 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.
Date Posted: 01/14/99