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 » Community » Newbie corner » always on top SOLVED (GUI)
Re: always on top [message #46265 is a reply to message #46259] Sun, 03 April 2016 14:03 Go to previous messageGo to previous message
Lance is currently offline  Lance
Messages: 527
Registered: March 2007
Contributor
nlneilson wrote on Sat, 02 April 2016 22:29
Here are the first lines of my app:

NefbG2() {
ver = " v2.1"; // snd Sleep time line 1895
// time_t tEnd = 1500e6; // 1 for ~11.6 days;
time_t tEnd = 1480e6; // 1 for ~11.6 days;
CtrlLayout(*this, "NefbG2 © " + ver);
TopMost(true, true).MinimizeBox();
NoCenter();
// FrameLess(true);
AddFrame(menu); // To make a menu bar you must add the frame before setting the callback
menu.Set(THISBACK(MainMenu)); // Set the menu callback

P1 <<= THISBACK(Point1Action);
P2 <<= THISBACK(Point2Action);

fnum = 1;
IO = true; ioX = false;
slocX = false;
cfgfile = "nefbg2.cfg";
reset();




Is NefbG2 a TopWindow derivative?
		TopMost(true, true).MinimizeBox();


Move this line (you might do without moving it, just in case) to the end of the NefbG2 constructor, and insert a call to Open() before it. End result is something like this:
	NefbG2() {
		ver = "  v2.1"; // snd Sleep time line 1895
//		time_t tEnd = 1500e6; // 1 for ~11.6 days;
		time_t tEnd = 1480e6; // 1 for ~11.6 days;
		CtrlLayout(*this, "NefbG2 ©   " + ver);
		NoCenter();
//		FrameLess(true);
		AddFrame(menu); 		// To make a menu bar you must add the frame before setting the callback
		menu.Set(THISBACK(MainMenu));   // Set the menu callback
		
		P1 <<= THISBACK(Point1Action);
		P2 <<= THISBACK(Point2Action);
		
		fnum = 1;
		IO = true; ioX = false;
		slocX = false;
	    cfgfile = "nefbg2.cfg";
		reset();
                
                Open();      //<-----Added
		TopMost(true, true).MinimizeBox();   //<---- Moved

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: upp-mingw-9671 with win\upp9628 SOLVED
Next Topic: link error with MINGW - - SOLVED
Goto Forum:
  


Current Time: Wed May 08 20:55:02 CEST 2024

Total time taken to generate the page: 0.02259 seconds