[MAXGUIEx] Tray icon code not working?
BlitzMax Forums/MaxGUI Module/[MAXGUIEx] Tray icon code not working?
| ||
Hey guys! I'm trying to get Ozak's code to work with MAXGUIEX: http://www.blitzmax.com/codearcs/codearcs.php?code=1643 Example code: Sinking / Showing an app from task bar. Any ideas why this isn't working are highly appreciated. Grisu |
| ||
The reason why it isn't working is that you can't handle Windows system messages (i.e those starting with WM_**********) using the standard Blitz event system as they aren't Blitz/MaxGUI events. I spent some time looking into this for you and the easiest (and probably most dirty) way of doing this is by registering a new WndProc that maps these events into Blitz ones. I've just noticed your original code-archive querym, so I've modded the code slightly so that it uses the executable icon (instead of an icon from a file) for the notification icon. If you copy and paste the code 'as-is', it will use MaxIDE's object resource file but you should obviously replace this with your own. Anyhoo, try the following: THIS WILL ONLY WORK WITH MAXGUI.WIN32MAXGUIEX You should then be able to process the events like regular MaxGUI ones, but watchout, the events don't hold any x,y co-ordinate info. You will have to play around a bit more to get these... |
| ||
Thanks a lot Seb. Works flawlessly. Have added this to Ozak's code archive entry in case other might need it as well. |