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 » One Main TopWindow and several others TopWindows, how? [SOLVED...]
Re: One Main TopWindow and several others TopWindows, how? [message #1799 is a reply to message #1796] Sun, 19 March 2006 10:38 Go to previous messageGo to previous message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
luzr wrote on Sun, 19 March 2006 09:13

Use OpenMain for all windows, but issue Run for the "main" window instead of Ctrl::EventLoop. That way, loop will be ended by closing the "main" window (and rest will get closed by destructors).

Mirek


Thanks! This works now:
#include <CtrlLib/CtrlLib.h>

GUI_APP_MAIN
{
	TopWindow w1;
	TopWindow w2;
	TopWindow w3main;

	w1.SetRect(650,500,100,100);
	w1.OpenMain();		
	w1.Title("w1"); 
	
	w2.SetRect(400,300,200,200);
	w2.OpenMain();		
	w2.Title("w2");

	w3main.SetRect(50,50,300,300);
	w3main.OpenMain();		
	w3main.Title("w3main").Run();	//you must Run() the last one!		
	
}


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to disable Maximize button on a dialog form? [SOLVED]
Next Topic: How do you use PopUp
Goto Forum:
  


Current Time: Sun May 12 18:39:44 CEST 2024

Total time taken to generate the page: 0.02289 seconds