I'm trying to make a small class in ruby, allowing me to make an icon in the system tray and use notification balloons. But I'm having problems using structures with Win32API calls.
http://www.ruby-forum.com/topic/18102
Shell_NotifyIcon Function
NOTIFYICONDATA Struct
Here is the code that I have, all it does is add an icon to the system tray:
require 'Win32API' NIF_MESSAGE = 1 NIF_ICON = 2 NIF_TIP = 4 NIF_STATE = 8 NIF_INFO = 10 NIM_ADD = 0 NIM_MODIFY = 1 NIM_DELETE = 2 NIS_HIDDEN = 1 NIS_SHAREDICON = 2 class NotifyIconData < Struct.new(:cbsize, :hwnd, :uid, :uflags, :ucallbackmessage, :hicon)
source share