Notifications
Clear all

[Closed] Docking to ActiveShade Window

Hi,

I’m trying to dock a rollout to the activeshade window when the user opens it, but I’m seeing some strange results and the rollout seems to half disappear after trying to dock.

This is the code I’m using to check for an open activeshade window and dock the rollout:


DialogMonitorOPS.unRegisterNotification id:#eyeInTheSky
try (DialogMonitorOPS.Enabled = false)catch()
try(cui.UnregisterDialogBar toolbox_rollout) catch()
try(destroydialog toolbox_rollout) catch()

global windowRef
global toolbox_rollout

fn dmnotification =
(
	WindowHandle = DialogMonitorOPS.GetWindowHandle()
	if UIAccessor.GetWindowClassName WindowHandle ==  "MaxBitmapViewerClass" do -- Look for activeshade window open
	(
		maxWin = windows.getmaxHWND()	--Get max window
		maxChildren = windows.getChildrenHWND 0	--Get open children
		
		for i in maxChildren do
		(
			for o in i do (
				if matchPattern (o as string) pattern:"ActiveShade*" do 
				(	-- AS Window found
					asWinName = o
					windowRef = windows.getChildHWND 0 asWinName	-- Get activeshade window hwnd
				)
			)
		)
		
		rollout toolbox_rollout "Dock Test Rollout" width:120
		(
			button pause_as "Pause" width:150 height:50 align:#center tooltip:"Pause Activeshade"
		)
		createDialog toolbox_rollout parent:windowRef[1] border:false style:#(#style_toolwindow) --create a dialog as child of activeshade window
		cui.RegisterDialogBar toolbox_rollout parent:windowRef[1]	--register rollout with as win
		cui.DockDialogBar toolbox_rollout #cui_dock_bottom	--dock
	)
	true
)

DialogMonitorOPS.RegisterNotification dmnotification id:#eyeInTheSky	-- register window notifications
DialogMonitorOPS.Enabled = true
DialogMonitorOPS.ShowNotification()

I’m at a bit of a loss here, thanks for any help/advise!

1 Reply
1 Reply
(@twoapple)
Joined: 10 months ago

Posts: 0

Can anyone help?
I have same problem.
Thank’s