All this is ok, as long as you know the text.
And substitution by itself is a simple one line code.
The user copies some text from some other window or application or a webpage by pressing Ctrl-C or by selecting Copy from the context
And as a programmer you do not know what text the user will copy.
And when the user wants to paste in the Get, he presses Ctrl-V or selects "Paste" from the right-click context menu.
Then the TGet class calls:
- Code: Select all Expand view
CallWindowProc( ::nOldProc, ::hWnd, WM_PASTE, 0, 0 )
Now the Windows OS reads the text from the Clipboard and Pastes in the Get buffer. While doing so the Windows OS truncates the string from CRLF onwards.
How and when do you apply to what text your logic of substituting CRLF or TAB ?
So, no point giving program to replace CRLF.
Give a program where if I copy whatever text which includes CRLF and paste in the Get, I will get all the text excepting the CRLF.