Detecting changes to editorgadget

Windows specific forum
PB&J Lover
Enthusiast
Enthusiast
Posts: 212
Joined: Fri Apr 22, 2005 2:07 pm
Location: U.S.A.
Contact:

Detecting changes to editorgadget

Post by PB&J Lover »

How does one detect changes to an editorgadget? :?
-- DB

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage — to move in the opposite direction.

Albert Einstein
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post 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)
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
PB&J Lover
Enthusiast
Enthusiast
Posts: 212
Joined: Fri Apr 22, 2005 2:07 pm
Location: U.S.A.
Contact:

follow up

Post 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? :?
-- DB

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage — to move in the opposite direction.

Albert Einstein
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

>> Is it a Windowevent?
no
Example: User close window, you can test saving required
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
PB&J Lover
Enthusiast
Enthusiast
Posts: 212
Joined: Fri Apr 22, 2005 2:07 pm
Location: U.S.A.
Contact:

Post by PB&J Lover »

I see, and it returns -1 (non zero) if changes are made. Otherwise 0.
Thanks. :D
-- DB

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage — to move in the opposite direction.

Albert Einstein
Post Reply