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 » Draw, Display, Images, Bitmaps, Icons » Toolbar images vanishing [SOLVED]
Re: Toolbar images vanishing [message #26033 is a reply to message #25900] Fri, 26 March 2010 17:25 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13976
Registered: November 2005
Ultimate Member
mdelfede wrote on Thu, 18 March 2010 11:51

Even simpler testcase (same image file as above...) :

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

#define IMAGECLASS BigIconsImg
#define IMAGEFILE <BigIcons/BigIcons.iml>
#include <Draw/iml.h>

INITBLOCK
{
	Image img = BigIconsImg::Flag();
};

class BigIcons : public TopWindow
{
	public:
		typedef BigIcons CLASSNAME;
		ToolBar toolBar;
		void nullFunc(void) {}
		BigIcons()
		{
			toolBar.Add("one", BigIconsImg::Flag(), THISBACK(nullFunc));
			AddFrame(toolBar);
		}
};

GUI_APP_MAIN
{
	BigIcons().Run();
}


It seems that accessing Iml from inside INITBLOCK can bring troubles....

Max



Definitely!

There is basic rule: No graphics in INITBLOCKs. Only Core stuff.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Draw::WrawText to paint ASCII sequence
Next Topic: Display::PaintBackground not called
Goto Forum:
  


Current Time: Fri May 10 05:09:06 CEST 2024

Total time taken to generate the page: 0.02252 seconds