Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use of SendMessage
#1
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:
 
Code:
Copy      Help
,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!


Messages In This Thread
Use of SendMessage - by ScottF - 04-27-2022, 12:15 PM
RE: Use of SendMessage - by Kevin - 05-03-2022, 01:55 PM
RE: Use of SendMessage - by ScottF - 05-03-2022, 08:12 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)