How to create a "chat" style window
This sample duplicates the functionality of a window such as those in
mIRC - where text is added to the bottom of a RichTextBox and is scrolled
into view IF the scroll bar is at the bottom, but doesn't move the window
when the user has scrolled up. Requires the Professional or Enterprise version
of VB5 or VB6.
Uses the following API functions and messages:
- CallWindowProc
- GetScrollInfo
- LockWindowUpdate
- SetWindowLong
- EM_REPLACESEL
- EM_SCROLLCARET
- EM_SETCHARFORMAT
- WM_DESTROY
- WM_PARENTNOTIFY
- WM_SETFOCUS
- WM_VSCROLL
Back to Code Samples
Copyright © 2001 by Matt E. Hart, All Rights Reserved Worldwide.
Nothing on this web site may be reproduced, in any form, without express written consent.