I'm writing a WordPad clone with wxWidget. The text control should be a native Windows control.
A strange thing appeared when trying to copy rather large amount of text (around 80000 characters) both with the wxTextCtrl::Paste function and with SendMessage and WM_PASTE: at first attempt only about 30000 characters are pasted, at second attempt more but still not all and only at third attempt is everything pasted successfully. It looks as if some sort of internal buffer is incrementally enlarged and if it cannot be made large enough with one step, only as much as pasted as currently possible (and at next attempt the buffer is enlarged by the same step).
Has anyone else experienced this and is there a solution?
I also discovered the same behaviour in an older no-rich-text Notepad clone of mine (also coded with wxWidgets), so I doubt it is just some undefined behaviour on my part.