Re: How do i get onChange event from RichEdit?

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

Thomas Julin wrote:
> 
> Derek Parnell wrote:
> > 
> > Thomas Julin wrote:
> > > 
> > > 
> > > How do i get onChange event from RichEdit?
> > 
> > It appears that you have to send a message to the control first to begin
> > receiving
> > Chnage messages from it. I'm not at my normal computer at the moment so I
> > can't
> > look up the values you need until later today, but it should look like ...
> > 
> >   VOID = sendMessage(myRichEdit, EM_SETEVENTMASK, 0, ENM_CHANGE)
> > 
> > I need to lookup the values for EM_SETEVENTMASK and ENM_CHANGE.
> 
> WM_USER = #0400,
> EM_SETEVENTMASK = (WM_USER + 69),
> ENM_CHANGE = #00000001
> 
> Thank you for your reply.
> It does not work for mee.

Ok, I've found the fix required. You have to add two lines to win32lib.ew ...

Find the line ...
    {EDIT,EN_CHANGE},      -- editbox notify change

and add this line after it ...

    {COMMON_CONTROL,EN_CHANGE},      -- richedit notify change

Then find the line ...
    {w32HChange,  w32CHG_Chg},   -- editbox notify change


and add this line after it ...
    {w32HChange,  w32CHG_Chg},   -- richedit notify change

This will get it working. I'll add this improvement to the library ASAP.

You will still need to send the EM_SETEVENTMASK message for now too.

-- 
Derek Parnell
Melbourne, Australia
Skype name: derek.j.parnell

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

Search



Quick Links

User menu

Not signed in.

Misc Menu