Fog Creek Software
Discussion Board

Windows Win32 replacement Edit control

Does anyone have one?

I know, that's blunt.  But frankly, I've searched the entire internet for months and have not been able to find a better (in terms of more efficient) replacement edit control.
An edit control that is simple and fast, with scroll bars, font changes, and COPY functionality.  Oh!  And where *I can* control the buffer it displays.

So I'm finally seriously contemplating writing my own that I need for use with Win32; and just figured to ask here as my last hope.

Hey, I believe in miracles.

Wednesday, July 28, 2004

What's wrong with the RichEdit control?

Wednesday, July 28, 2004

Have you looked at ?

Mark Erikson
Thursday, July 29, 2004

You should definately take Scintilla a try, it meets all your requirements.  It's also flexible and easy to code:

Ged Byrne
Thursday, July 29, 2004

If you're using Delphi or C++Builder, try SynEdit at -- it basically contains anything you'd wish for in an editor control, for free.

Frederik Slijkerman
Thursday, July 29, 2004

Why do you need direct access to the display buffer?

Thursday, July 29, 2004

I need my edit control to truncate after about 16k worth of data (or any other arbitrary limit), and continue scrolling with the addition of new data.

Using SetSel and ReplaceSel relies on SendMessage, which bogs down the control and stalls my GUI due to the fact the control is heavily bombarded with incoming data data to display.  If I had access to the buffer, it could allow me to truncate and update the control without using Sendmessages and greatly improve the response time, so that it shouldn't stall with the flood of new data to display at the same time.

Atleast that's my theory.

Thursday, July 29, 2004

Sedwo, given what you want to do - you DO want access to the edit control's buffer. I have experience tricking out edit controls to behave in a custom way based upon the contents - masked edits, etc - and you are entirely correct. Relying on the current selection location and length works OK until a user tries a keystroke, mouse or selection combination that you haven't tested against. And anyway, it looks ugly to see the selection flashing constantly while you're typing.

I can't help you find a replacement edit control but you're on the right track.

Bored Bystander
Thursday, July 29, 2004

Thanks for the vote of confidence.  Atleast I'm proud of that I was able to articulate my dillemma without confusing people.  Practice is always good.

I just can't believe nobody here might have encountered a similar problem.  Heck the control has been around for a decade now.  Maybe I'm just going about it the wrong way.  Maybe there is some other technique in the way I'm using it that works better.

Looks like I'll be rolling up my sleeve and hacking away at my own custom edit control soon then.

Thursday, July 29, 2004

Set the limit with EM_SETLIMITTEXT

Insert new text with EM_SETTEXTEX

Thursday, July 29, 2004

*  Recent Topics

*  Fog Creek Home