Write text to notepad with C#/Win32

前端 未结 1 885
滥情空心
滥情空心 2021-02-07 11:42

I\'m messing around with Win32 API and windows messaging trying to figure out how things work and I found this question very helpful.

I\'d like to improve upon the solut

相关标签:
1条回答
  • 2021-02-07 12:05

    Send EM_SETSEL to put the caret to the end of the edit window. Then send EM_REPLACESEL to append text.

    This is much better than reading the entire contents, appending your addition and then setting the entire contents if the edit control contains a large amount of text.

    These methods can cross 32/64 bit process boundaries without difficulty.

    0 讨论(0)
提交回复
热议问题