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 |
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 )
#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
|
|
|
Goto Forum:
Current Time: Thu May 23 16:14:33 CEST 2024
Total time taken to generate the page: 0.02424 seconds
|