Page 1 of 1

Detecting changes to editorgadget

Posted: Wed Sep 28, 2005 9:04 pm
by PB&J Lover
How does one detect changes to an editorgadget? :?

Posted: Wed Sep 28, 2005 9:09 pm
by ts-soft

Code: Select all

SendMessage_(GadgetID(Gadget), #EM_GETMODIFY, #Null, #Null)
And for the next question :wink:

Code: Select all

SendMessage_(GadgetID(Gadget), #EM_SETMODIFY, #True, #Null)
or

Code: Select all

SendMessage_(GadgetID(Gadget), #EM_SETMODIFY, #False, #Null)

follow up

Posted: Wed Sep 28, 2005 9:23 pm
by PB&J Lover
I'm not sure how to use this (I'm new to using Editorgadgets).
Something like?

Code: Select all

result.l = SendMessage_(GadgetID(Gadget), #EM_GETMODIFY, #Null, #Null)
Do I need to scan for this message? Is it a Windowevent? :?

Posted: Wed Sep 28, 2005 9:29 pm
by ts-soft
>> Is it a Windowevent?
no
Example: User close window, you can test saving required

Posted: Wed Sep 28, 2005 9:48 pm
by PB&J Lover
I see, and it returns -1 (non zero) if changes are made. Otherwise 0.
Thanks. :D