|
|
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 |
cbpporter
Messages: 1401 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.
|
|
|
Goto Forum:
Current Time: Fri Apr 26 21:39:52 CEST 2024
Total time taken to generate the page: 0.01666 seconds
|
|
|