Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
lucpolak is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to get top and left position of top window
Next Topic: [BUG?] X11 (at least OSX) Menus displayed under TopWindow, owner=RootWindow
Goto Forum:
  


Current Time: Thu Sep 18 05:28:45 CEST 2025

Total time taken to generate the page: 0.07176 seconds