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 » windows dont close except by to calls
Re: windows dont close except by to calls [message #17858 is a reply to message #17857] Sun, 31 August 2008 15:08 Go to previous message
cbpporter is currently offline  cbpporter
Messages: 1428
Registered: September 2007
Ultimate Contributor
TeCNoYoTTa wrote on Sun, 31 August 2008 15:45

i show it by
Settings_Window.Run();


Here's you problem. Run calls Ctrl::EventLoop(), which must be called exactly once. Only use Run for your main window. Use an Open/OpenMain or Execute method to show additional windows.

Or you could not use Run at all:
GUI_APP_MAIN
{
   ...
   MyWindow1 win1;
   win1.OpenMain();
   Ctrl::EventLoop();
}

Additional windows can be opened without Run, with Open, and Ctrl::EventLoop is not necessary outside of the main function.

Quote:


but i have a Question .....how can i call the constructor of the window every time it shows ??

You can't. but you can add a new method to your window class which does all the initialization than is needed when a window is shows and on the last line of that function open the window.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Maximize Promblem with Ubuntu6.10 on amd64
Next Topic: Is it possible to show a console window in GUI_APP_MAIN?
Goto Forum:
  


Current Time: Sun Aug 17 04:45:47 CEST 2025

Total time taken to generate the page: 0.06321 seconds