Notifiy about button state changes
Hello,
I try to implement a callback in my script to be notified when a button state has changed in modify panel.
This button can be "checked" (blue background) and unchecked, so i was presuming it would be like a checkbox states, but it doesn't work.
Here's the code :
DialogMonitorOPS.unRegisterNotification id:#lookFillet fn lookFilletCb = ( filletBtn = windows.getchildhwnd #max "Fillet" filletHandle = filletBtn[1] local BM_GETSTATE = 0xF2 local BST_CHECKED = 0x1 local checkState = windows.sendMessage filletHandle BM_GETSTATE 0 0 local isChecked = bit.get filletHandle BST_CHECKED format "the button was: %\n" isChecked true ) DialogMonitorOPS.Interactive = false DialogMonitorOPS.RegisterNotification lookFilletCb id:#lookFillet DialogMonitorOPS.Enabled = true DialogMonitorOPS.ShowNotification()
The checkState is always equals to 0.
Maybe I could find a way to be notified when the background color of the button has changed, but WM_CTLCOLORBTN gives me always the same value too...
Is there any way to be notified ?
Thanks !