Code: Select all
const unsigned int WM_TASKBARCREATED= RegisterWindowMessage(_T("TaskbarCreated"));
// in the main window message proc...
LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
if (WM_TASKBARCREATED == uMsg)
Shell_NotifyIcon(NIM_ADD, your_notify_icon_data); // or call your tray handler function
switch(uMsg)
{
...
cheers,
Fede