Trying to find the best way to go about moving a dialog via, left click + drag (holding left mouse button) using a button within the rollout.
So far I got this. It works kind of, but it seems to crash max, and can’t uncheck the button.
try (destroydialog exdialog) catch () global exdialog rollout exdialog "" ( checkbutton moveexdialog "Click + Drag Me" pos:[5,5] width:95 height:20 button closedialog "Close Me" pos:[105,5] width:55 height:20 on moveexdialog changed state do ( while state == true do ( origmousepos = (mouse.screenpos - (moveexdialog.pos + [42,7])) SetDialogPos exdialog origmousepos ) ) on closedialog pressed do ( try (destroydialog exdialog) catch () ) ) createdialog exdialog width:170 height:30 style:#(#style_sysmenu, #style_minimizebox, #style_normalbox)
Looking for a cleaner way, and something that is hold left mouse button + drag, then on release it un-checks the button.
Please anyone with a solution via maxscript reply with the maxscript.