Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Move text UP in text box control
#1
Currently text is appended below current text in a rich text box, from the top down. I see that MSDN library has scroll to caret method so you can start at the bottom of the text box and move the text UP.

Can I use EM_SCROLLCARET to achieve this in the dialog? If so, could I have an example? Currently I am using the following to output the text to the dialog

Macro TRP_FINAL
Code:
Copy      Help
SendMessage hDlg WM_APP 18 F"{CurrentNumber}"

Function _15_4_HOT
Code:
Copy      Help
int hwndControl=id(wParam hDlg)
,,    SendMessage hwndControl EM_SETSEL 1000000000 1000000000
,,    SendMessage hwndControl EM_REPLACESEL 0 F"{lParam%%s}[]"

Thanks kindly
Matt
#2
Can use EM_SCROLLCARET and other similar messages like documented in MSDN. Probably at first need to move caret with EM_SETSEL. Then, if does not scroll automatically, send EM_SCROLLCARET.


Forum Jump:


Users browsing this thread: 1 Guest(s)