Great work so far. Raibow's nice, but it's too hard to work with for my liking. I can't tell from your screenshots, but do you use panels for all gadget-types, like rainbow does, or do you actually show one of the gadgets on the visual panel? The latter would be a nice improvement.
Also, do you happen to be using Cryptoman's systray.dll (attached)?
It was never officially finished, so if you have another dll, you might be better off using that, but it works really well for me.
If so, here are some functions I wrote that make the system tray icon and menu work as if they were native to BlueGUI (same event sytem, mostly):
rem Systray.dll functions using BlueGUI2. Version 1 Mark II
function postTrayEvent(iconhandle,iconmenuhandle,memblocknuma)
local trayevent
local trayeventdata
local msg
local temp
local a
trayevent = 0
trayeventdata = 0
for a=0 to 51 step 4
temp=a+iconhandle
msg=*temp
if msg=0x200 or msg=0x201 or msg=0x202 or msg=0x203 or msg=0x204 or msg=0x205 or msg=0x206 or msg=0x2A1 then trayevent = msg
if trayevent = 0x204
trayeventdata = showIconMenu(iconmenuhandle,memblocknuma)
trayevent = 0x401
endif
if trayevent<>0 then exit
next a
flushTrayEvents(iconhandle)
if trayevent then postEvent iconhandle,trayevent,trayeventdata,0
endfunction
function flushTrayEvents(iconhandleb)
local temp
local b
for b=0 to 51 step 4
temp=b+iconhandleb
*temp=0
next b
endfunction
function createTrayIcon(caption as string)
local returnval
returnval = call dll(systraynum,"starticon")
call dll systraynum,"sni_command",0
call dll systraynum,"systraytip",caption
endfunction returnval
function createIconMenu(memblocknum)
local returnval
returnval = call dll(user32num,"CreatePopupMenu")
make memblock memblocknum,8
endfunction returnval
function addIconMenuItem(menuhandle,caption as string,menureturnvalue)
call dll user32num,"AppendMenuA",menuhandle,0,menureturnvalue,"&"+caption
endfunction
function showIconMenu(menuhandle,memblocknum)
local returnval
local cursorx
local cursory
call dll user32num,"GetCursorPos",get memblock ptr(memblocknum)
cursorx = memblock word(memblocknum,0)
cursory = memblock word(memblocknum,4)
returnval=call dll(user32num,"TrackPopupMenu",menuhandle,4096+256,cursorx,cursory,0,mainWindow(),0)
endfunction returnval
function deleteIconMenu(iconmenuhandle,memblocknum)
call dll user32num,"DestroyMenu",iconmenuhandle
delete memblock memblocknum
endfunction
function activateTrayIcon()
call dll systraynum,"sni_command",4
endfunction
function deleteTrayIcon()
call dll systraynum,"sni_command",1
endfunction
Just call 'postTrayEvent(iconhandle,iconmenuhandle,memblocknum)' before every 'getEvent'. memblocknum is the memblock-number of the memblock associated with the tray's menu.
-Xol