Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Edit control modifies the current line of text
#10
it sort of works but has flaws. If cursor is not at end of line replacement is wherever cursor is. Better to use longer code, it is the correct way.

this
cursorPos&0xFFFF
cursorPos>>16

is the the low-order word and  the high-order word of the returned value.

Edit controls: The LOWORD specifies the zero-based index of the character nearest the specified point. This index is relative to the beginning of the control, not the beginning of the line. If the specified point is beyond the last character in the edit control, the return value indicates the last character in the control. The HIWORD specifies the zero-based index of the line that contains the character. For single-line edit controls, this value is zero. The index indicates the line delimiter if the specified point is beyond the last visible character in a line.
EM_CHARFROMPOS message (Winuser.h) - Win32 apps | Microsoft Learn


Messages In This Thread
RE: Edit control modifies the current line of text - by Kevin - 02-27-2023, 06:39 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)