So I wanted to have my program display a number in the system tray, and decided to do it programatically (e.g. not 99 icons). Reading through MSDN resulted in me writing my own code to do everything myself, and menus were a pain. Ideally I wanted to use all AutoIt tray functions BUT use a HIcon rather than a file path. Impossible eh? Not with the AutoIt source code!! All you need to do is know the following:
Global Const $AUT_WM_NOTIFYICON = $WM_USER + 1
Global Const $AUT_NOTIFY_ICON_ID = 1