RichEdit w32HChange

new topic     » topic index » view thread      » older message » newer message

Chris,

Some time ago Rad and yourself worked a solution to w32HChange for RichEdit

http://www.openeuphoria.org/cgi-bin/esearch.exu?thread=1&fromMonth=4&fromYear=C&toMonth=6&toYear=C&keywords="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;

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)


Any chance of putting it in the library please?

Regards,

Bob

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu