Notification from WB Icon
Posted: Fri May 26, 2023 10:47 pm
Hi,
When my program is run it places a special icon on the Workbench using SetWBIcon(). I'm using MUIRoyale with a Hollywood gadget within the display. I want to open the MUI window when the WBIcon is double-clicked and close the MUI window when the close button is pressed. I thought that double-clicking the WBIcon would send a ShowWindow event so this would be easy. Unfortunately, if you run the following code and double-click the WBIcon you'll see that you get no notification. I've worked a couple of days now on this using multiple displays (like a 1x1 white pixel in the menu bar) and such but to no avail so far. How do I get notified when the WBIcon is double-clicked? Thanks.
NathanH
When my program is run it places a special icon on the Workbench using SetWBIcon(). I'm using MUIRoyale with a Hollywood gadget within the display. I want to open the MUI window when the WBIcon is double-clicked and close the MUI window when the close button is pressed. I thought that double-clicking the WBIcon would send a ShowWindow event so this would be easy. Unfortunately, if you run the following code and double-click the WBIcon you'll see that you get no notification. I've worked a couple of days now on this using multiple displays (like a 1x1 white pixel in the menu bar) and such but to no avail so far. How do I get notified when the WBIcon is double-clicked? Thanks.
NathanH
Code: Select all
@DISPLAY {Hidden=True}
SetWBIcon(#AMIGAICON_SHOW)
Function p_EventFunc(msg)
Switch msg.Action
Case "HideWindow":
DebugPrint("HideWindow")
Case "ShowWindow":
DebugPrint("ShowWindow")
EndSwitch
EndFunction
InstallEventHandler({ShowWindow=p_EventFunc, HideWindow=p_EventFunc})
Repeat
WaitEvent
Forever