04-27-2022, 12:15 PM
Hi All,
I'm trying to learn the use of SendMessage.
So I have a complex Dialog with a Multiline Edit Control and lots of buttons.
The edit control text is populated with C:\temp\test.txt when initialized.
Also when text is added to the control it will get wintext and setfile back to C:\temp\test.txt.
If I manually edit the file C:\temp\test.txt in Notepad and Save, I want to be able to Set the wintext
from the file to the control and leave the blinking cursor at end of text in the control,
without activating the dialog or control.
How would this be possible?
I did see some examples here like Eg: QM editor background color but mainly just for color.
Not sure if I'm on the right track with:
Any advice much appreciated, Thanks!
I'm trying to learn the use of SendMessage.
So I have a complex Dialog with a Multiline Edit Control and lots of buttons.
The edit control text is populated with C:\temp\test.txt when initialized.
Also when text is added to the control it will get wintext and setfile back to C:\temp\test.txt.
If I manually edit the file C:\temp\test.txt in Notepad and Save, I want to be able to Set the wintext
from the file to the control and leave the blinking cursor at end of text in the control,
without activating the dialog or control.
How would this be possible?
I did see some examples here like Eg: QM editor background color but mainly just for color.
Not sure if I'm on the right track with:
,int selStart selEnd
,int line=SendMessage(lParam EM_LINEFROMCHAR -1 0)
,SendMessage(lParam EM_SETSEL &selStart &selEnd)
,SendMessage(lParam EM_LINESCROLL 0 line)
Any advice much appreciated, Thanks!