Notifications
Clear all

[Closed] Close event handler on native window

Ok, I see what you mean. Using do not MatEditor.isOpen() for isChecked handler sure will work for macrobuttons. Topic starter asked exactly that.

2 Replies
(@denist)
Joined: 10 months ago

Posts: 0

most max dialogs send an “update toolbar buttons” message on open/close. so every macro button catches it with its own handlers.
but there may be some dialogs which don’t send. these dialogs need special attention.

(@serejah)
Joined: 10 months ago

Posts: 0

do you know what kind of notification code could it be?

I guess it is possible to catch it with dotNetObject "managedservices.maxnotificationlistener" <code>

@denisT
man i think you’re a genius
on ischecked do MatEditor.isOpen() worked very well

now the button gets checked when the dialog is opened and gets unchecked instantly with some dialogs and others after a couple of clicks here and there

thanks alot @Serejah for pointing out multiple ways i was not aware of them before
thanks alot guys

this notification should be forced by third party tools, and implemented by the system for its own dialogs that have action buttons on the main or other built-in toolbars:
see SetMacroButtonStates

Haven’t seen this method before, thanks!
I checked the sources for these methods in core.dll and looks like there’s nothing to subscribe and listen to, so it is not a notification but a way for plugin to invalidate and redraw button rect.

Page 2 / 2