I noticed that SphtBot prevents new text being added to the richtextbox from resetting the start point to the bottom. What API did you use to do that?
None, I reckon. He probably took time out of his day to learn some RTF and modifed RichTextBox.TextRTF instead of using SelStart, SelColor, and SelText. By not chaning SelStart.. he doesn't change the SelStart.
Quote from: J on April 22, 2006, 10:53 AM
None, I reckon. He probably took time out of his day to learn some RTF and modifed RichTextBox.TextRTF instead of using SelStart, SelColor, and SelText. By not chaning SelStart.. he doesn't change the SelStart.
No, I'm pretty sure Spht uses SendMessageA and not the properties that are available on the RichTextBox control. I used to do this my self also, it's much more complex then you probably think it is.
It utilizes the Richedit API.
Quote from: Spht on April 22, 2006, 02:22 PM
It utilizes the Richedit API.
Which ones in particular?
Hm... I think I found them
SendMessage(rtbChat(0).hwnd, WM_SETREDRAW, 0, intPointer)
SendMessage(rtbChat(0).hwnd, EM_GETEVENTMASK, 0, intPointer)
Quote from: Topaz on April 22, 2006, 04:40 PM
Quote from: Spht on April 22, 2006, 02:22 PM
It utilizes the Richedit API.
Which ones in particular?
Hm... I think I found them
SendMessage(rtbChat(0).hwnd, WM_SETREDRAW, 0, intPointer)
SendMessage(rtbChat(0).hwnd, EM_GETEVENTMASK, 0, intPointer)
A
lot more is involved besides that :P
Quote from: UserLoser on April 23, 2006, 10:05 AM
Quote from: Topaz on April 22, 2006, 04:40 PM
Quote from: Spht on April 22, 2006, 02:22 PM
It utilizes the Richedit API.
Which ones in particular?
Hm... I think I found them
SendMessage(rtbChat(0).hwnd, WM_SETREDRAW, 0, intPointer)
SendMessage(rtbChat(0).hwnd, EM_GETEVENTMASK, 0, intPointer)
A lot more is involved besides that :P
Two more lines to lock events, but those calls are doing what I need :-p
WM_SETREDRAW can be useful in preventing the Richedit from redrawing redundantly when you do multiple things together like append text, remove text, or change scroll positions.
I don't use EM_SETEVENTMASK.
Quote from: Spht on April 23, 2006, 06:09 PM
WM_SETREDRAW can be useful in preventing the Richedit from redrawing redundantly when you do multiple things together like append text, remove text, or change scroll positions.
I don't use EM_SETEVENTMASK.
Hum... which message do you use? I'm losing user talk thats sent at about the same time the top line is cleared... not the result I desire :-P