• Welcome to Valhalla Legends Archive.
 

Hey Spht...

Started by topaz, April 22, 2006, 04:15 AM

Previous topic - Next topic

topaz

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?
RLY...?

Joe[x86]

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: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

UserLoser

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.

Spht

It utilizes the Richedit API.

topaz

#4
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)
RLY...?

UserLoser

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

topaz

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
RLY...?

Spht

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.

topaz

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
RLY...?