lucpolak Messages: 18 Registered: April 2008 Location: France
Promising Member
Up up
I found on the web that restoring the TrayIcon can be made by catching the WM_TASKBARCREATED message.
It can be done by declaring this in the WindowProc fct :
// Somewhere in the code or header ....
UINT WM_TASKBARCREATED = 0 ;
// In the WindowProc
if (message == WM_CREATE)
WM_TASKBARCREATED = RegisterWindowMessageA("TaskbarCreated");
if (message == WM_TASKBARCREATED)
{
// Restore the icon ... how can i do it ?
}
I've tried de call TrayIcon::Show() method but it crash with a Shell_NotifyIcon Exception because in the Notify Fonction (TrayIconWin32.cpp) we have this line :