Re: RichEdit w32HChange
- Posted by CChris <christian.cuvier at agri?ult?re.gouv.fr> Jun 06, 2008
- 670 views
Bob Thompson wrote: > > > Chris, > > Some time ago Rad and yourself worked a solution to w32HChange for RichEdit > > <a > href="http://www.openeuphoria.org/cgi-bin/esearch.exu?thread=1&fromMonth=4&fromYear=C&toMonth=6&toYear=C&keywords=">http://www.openeuphoria.org/cgi-bin/esearch.exu?thread=1&fromMonth=4&fromYear=C&toMonth=6&toYear=C&keywords=</a>"w32HChange+event+on+RichEdit" > > and you ended up with something like this; > > In win32lib.ew, find > > {w32HChange, w32CHG_Chg}, -- editbox notify change > > Add below it: > > {w32HChange, w32CHG_Chg}, -- RichEdit notify change > > Likewise find > > {EDIT,EN_CHANGE}, -- editbox notify change > > Add below this: > > {COMMON_CONTROL,EN_CHANGE}, -- RichEdit (and others) notify change > > Then; > > }}} <eucode> > include Win32Lib.ew > without warning > > constant win = createEx(Window, "", 0, 20, 20, 400, 280, 0, 0) > constant edit = createEx(RichEdit, "", win, 0, 0, w32Edge, > {w32Edge, +34}, or_all({ES_NOHIDESEL}), 0) > --====================================================== > atom flags, set_mask > --====================================================== > flags = sendMessage(edit, #043B, 0, 0)--EM_GETEVENTMASK > flags = or_bits(flags, 1)--ENM_CHANGE > set_mask = sendMessage(edit, #0445, 0, flags)--EM_SETEVENTMASK > --====================================================== > procedure edit_on_change(atom self, atom event, sequence params) > VOID = message_box("", "Rich edit changed", MB_OK) > end procedure > setHandler(edit, w32HChange, routine_id("edit_on_change")) > --====================================================== > WinMain({win, edit}, Normal) > </eucode> {{{ > > Any chance of putting it in the library please? > > Regards, > > Bob The changes are in the working copy already. I have a serious bug which I want to diagnose and fix, hopefully tonight. Then I'll release 70.4a, that has this small enhancement and more, and a number of bug fixes. RL did slow things down these days. CChris