Home » U++ Library support » TopWindow&PopUp, TrayIcon » Restoring TrayIcon control
Re: Restoring TrayIcon control [SOLVED] [message #32135 is a reply to message #32099] |
Tue, 26 April 2011 17:20   |
lucpolak
Messages: 18 Registered: April 2008 Location: France
|
Promising Member |
|
|
After a long time, i've found the solution :
In CtrlCore, add a static variable to the class Ctrl to store the value of Windows Message TaskbarCreated :
[...]
#ifdef PLATFORM_WIN32
static UINT WM_TASKBARCREATED;
#endif
static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
In Win32Wnd.cpp, initialize this static variable :
static bool sFinished;
UINT Ctrl::WM_TASKBARCREATED = 0;
[...]
And in the WndProc function, Register the TaskbarCreated Message :
if (message == WM_CREATE)
{
WM_TASKBARCREATED = RegisterWindowMessageA("TaskbarCreated") ;
ELOG("Ctrl::TASKBARCREATED = "<<WM_TASKBARCREATED);
}
Finally, in the TrayIconWin32.cpp, restore the icon if needed :
LRESULT TrayIcon::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
if (message == WM_TASKBARCREATED)
{
RLOG("TrayIcon::WM_TASKBARCREATED");
visible = false;
Show();
}
else if(message == UM_TASKBAR_)
[...]
So, can you integrate it in the next revision of Upp ?
Thanks,
Lucas
|
|
|
Goto Forum:
Current Time: Thu Sep 18 05:29:25 CEST 2025
Total time taken to generate the page: 0.06741 seconds
|