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 » Multiple windows and focus
Re: Multiple windows and focus [message #10373 is a reply to message #10369] Wed, 04 July 2007 16:10 Go to previous messageGo to previous message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
mrjt wrote on Wed, 04 July 2007 14:07

		win->SetForeground();
		win->SetFocus();

Works fine for me. Also you don't need to call LostFocus, this will be done for you.

Yes, it's working fine, thanks Smile I tried a lot of things, but I missed this method !

mrjt wrote on Wed, 04 July 2007 14:07

You might want to use the Upp class Ptr<TopWindow> instead of the pointers. Then you don't need to worry about setting them back to NULL. Personally I'd keep them in an array of Ptrs.

I'm still new with UPP and don't know how to use this (even if I gess a little...). Is there a document explaining that, or I must study the sources ?

mrjt wrote on Wed, 04 July 2007 14:07

Do you really need to create/delete the windows when they are opened/closed? Unless you will have many of them you could just have them as members and not have to worry about it.

Sometimes, I have few simple windows, so I could effectively create them all at the begining. But sometimes I need several complex windows, so I think that it's better to create/delete to save memory...

mrjt wrote on Wed, 04 July 2007 14:07

Or you could google for 'Singleton class C++', which might do what you're looking for.

Yes, I could use a singleton. But is there a singleton base class in UPP ? For me, singleton is more especially interesting for a team of developpers, and in most cases I'm developping alone.

Anyway, if there is not yet, I think that a singleton base class would be interresting in UPP, even if it's not difficult to create one's own : no need to re-invent the wheel each time... Maybe to think for a next version Wink

Thanks for your help and advices Smile

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Can't get rid of minimize button on Linux, okay on Win32
Next Topic: System tray on windows
Goto Forum:
  


Current Time: Sat Apr 27 19:13:36 CEST 2024

Total time taken to generate the page: 1.72259 seconds