1. How do i get onChange event from RichEdit?

How do i get onChange event from RichEdit?

foxrym.

new topic     » topic index » view message » categorize

2. Re: How do i get onChange event from RichEdit?

Thomas Julin wrote:
> 
> 
> How do i get onChange event from RichEdit?
> 
> foxrym.

Same way you would with any other Control.

Don Cole

new topic     » goto parent     » topic index » view message » categorize

3. Re: How do i get onChange event from RichEdit?

don cole wrote:
> 
> Thomas Julin wrote:
> > 
> > 
> > How do i get onChange event from RichEdit?
> > 
> > foxrym.
> 
> Same way you would with any other Control.
> 
> Don Cole


Sorry for this dumb question but
setHandler(RichID, w32HChange, routine_id("rich_ctrl")
doe not work for me. Only MleText return w32HEvent.

foxrym.

new topic     » goto parent     » topic index » view message » categorize

4. Re: How do i get onChange event from RichEdit?

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.

This will be fixed up for future releases of the Win32lib library such that its
done automatically for all rich edit controls.

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

new topic     » goto parent     » topic index » view message » categorize

5. Re: How do i get onChange event from RichEdit?

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.

new topic     » goto parent     » topic index » view message » categorize

6. Re: How do i get onChange event from RichEdit?

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 message » categorize

7. Re: How do i get onChange event from RichEdit?

Derek Parnell wrote:
> 
> Thomas Julin wrote:
> > 
> > Derek Parnell wrote:
> > > 
> > > Thomas Julin wrote:
> > > > 
> > > > 
> > > > How do i get onChange event from RichEdit?
> > > 

> 
> 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.

Thank you.
Julin

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu