Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Edit control modifies the current line of text
#9
Thanks again 
 The following code is short and effective, but I don't know why  Big Grin

Code:
Copy      Help
#sub SetCurLine2
function h str's

int cursorPos = SendMessage(h EM_CHARFROMPOS 0 -1)

int cpos = cursorPos&0xFFFF

int line = cursorPos>>16

int lineStart = SendMessage(h EM_LINEINDEX line 0)
SendMessage(h EM_SETSEL lineStart cpos)

_s.getsel
_s+ s
SendMessageW h EM_REPLACESEL 1 @_s

I can't understand the following code. Where can I find this explanation?
Code:
Copy      Help
cursorPos&0xFFFF
cursorPos>>16


Messages In This Thread
RE: Edit control modifies the current line of text - by Davider - 02-27-2023, 05:43 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)