Skip to content

Instantly share code, notes, and snippets.

@noqisofon
Created November 11, 2010 12:37
Show Gist options
  • Save noqisofon/672424 to your computer and use it in GitHub Desktop.
Save noqisofon/672424 to your computer and use it in GitHub Desktop.
タスクトレイに常駐プログラムを追加する感じ。
typedef char gchar;
typedef HWND widget_t;
typedef HICON icon_t;
typedef NOTIFYICONDATA notify_icon_t;
void notifyicon_demo_append_notify_icon(widget_t window, icon_t tasktray_icon)
{
notify_icon_t notify;
gchar tooltip_text[] = "もふーん";
notify.cbSize = sizeof(notify_icon_t);
notify.hWnd = window;
notify.uID = 0;
notify.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
notify.uCallbackMessage = WM_TRAYICONMESSAGE;
notify.hICon = tasktray_icon;
shell_notifyicon_append( &notify );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment