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 » Extra libraries, Code snippets, applications etc. » C++ language problems and code snippets » multiple classes include-problem
Re: multiple classes include-problem [message #14428 is a reply to message #14427] Tue, 26 February 2008 14:03 Go to previous messageGo to previous message
bytefield is currently offline  bytefield
Messages: 210
Registered: December 2007
Experienced Member
I don't know if i do good but I was having problems with Images, so i simply use different classes for the same *.iml file(maybe it duplicate the images stored in executable, don't know). Here is an example (maybe bad one Rolling Eyes )

#ifndef _ImageEx_ImageEx_h
#define _ImageEx_ImageEx_h

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

#define LAYOUTFILE <ImageEx/ImageEx.lay>
#include <CtrlCore/lay.h>

class ImageEx : public WithImageExLayout<TopWindow> {
public:
	ImageEx();
};

class Second: public TopWindow
{
public:
	Second();	
};
#endif


#include "ImageEx.h"

#define IMAGECLASS FirstImg
#define IMAGEFILE <ImageEx/ImageEx.iml>
#include <Draw/iml.h>

ImageEx::ImageEx()
{
	CtrlLayout(*this, "Window title");
	Icon(FirstImg::MyImage());
}

GUI_APP_MAIN
{
	ImageEx().Run();
}


#include "ImageEx.h"

#define IMAGECLASS SecondImg
#define IMAGEFILE <ImageEx/ImageEx.iml>
#include <Draw/iml.h>

Second::Second()
{
	Icon(SecondImg::MyImage());
}


cdabbd745f1234c2751ee1f932d1dd75

[Updated on: Tue, 26 February 2008 14:04]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Template problem
Next Topic: Optimized memcmp for x86
Goto Forum:
  


Current Time: Mon May 13 00:03:16 CEST 2024

Total time taken to generate the page: 0.02532 seconds