0

I am looking for a way to implement a multi-line CEdit control that allows you to type anywhere in the text box just like the links below. If there's already an implementation of this, please let me know. Thanks.

image example: https://i.stack.imgur.com/cMBIG.png

gif example: https://i.stack.imgur.com/iFMGl.jpg

vg8open
  • 57
  • 6
  • Try `CRichEditCtrl` https://msdn.microsoft.com/en-us/library/76a787xf.aspx Or you could use the raw unwrapped control: https://msdn.microsoft.com/en-us/library/windows/desktop/bb787605(v=vs.85).aspx – Richard Critten Jan 17 '18 at 17:02
  • 1
    You have to roll out your own solution. Get the mouse position to create an edit box on a white parent window, save the text and dimension of that edit box, then draw it manually on parent window. RichEdit deosn't help, unless you use tables which is very complicated. – Barmak Shemirani Jan 17 '18 at 17:44
  • 1
    Simplest idea: Assign a fixed-width font, fill the edit control with space characters, disable insertion mode (so it will always overwrite). Also prevent return key from inserting new lines and so on... – zett42 Jan 17 '18 at 20:29
  • The feature is commonly called *"virtual space"* (e.g. in Visual Studio's text editors). Using this term you may have better luck finding a solution to your problem online. – IInspectable Jan 17 '18 at 21:40
  • @zett42 This might be the solution I'll have to go with... – vg8open Jan 18 '18 at 00:25
  • @IInspectable I searched "virtual space", but nothing useful come up. I'll do some more googling – vg8open Jan 18 '18 at 00:26

0 Answers0