Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
rtf control, en_change?
#1
Is there a way to detect text change in an rich editfield, EN_CHANGE does not work.
With timer I could do get text and compare it with original text but I was hoping there might be a better way?

Function rtf_ctrl__en_change__test
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 223 108 "Dialog"
;3 RichEdit20A 0x54233044 0x200 1 2 220 103 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040601 "*" "" "" ""

str controls = "3"
str re3
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case EN_CHANGE<<16|3
,,out "text modified..."
ret 1
#2
Code:
Copy      Help
,case WM_INITDIALOG
,SendMessage id(3 hDlg) EM_SETEVENTMASK 0 ENM_CHANGE
#3
Thank you!!!!


Forum Jump:


Users browsing this thread: 1 Guest(s)