Status & Roadmap
Authors & License
Funding Ultimate++
Search on this site
Search in forums

SourceForge.net Logo
Home » Community » Newbie corner » Hey,need help,i met a problem
Hey,need help,i met a problem [message #47019] Mon, 07 November 2016 08:41 Go to next message
foxsir2016 is currently offline  foxsir2016
Messages: 3
Registered: November 2016
Junior Member
hey ,guys,
im a newbie.
i copy this code from official tutorial

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

#define IMAGECLASS MyImages
#define IMAGEFILE <Image01/Image01.iml>
#include <Draw/iml.h>

class MyApp : public TopWindow {
virtual void Paint(Draw& draw);

void MyApp::Paint(Draw& w)
w.DrawRect(GetSize(), SColorFace());
w.DrawImage(50, 50, MyImages::MyImage());


when i compile it,it give me this error
fatal error: Image01/Image01.iml: No such file or directory

how i can create this iml file?and place it to where can work
Re: Hey,need help,i met a problem [message #48597 is a reply to message #47019] Fri, 04 August 2017 17:25 Go to previous messageGo to next message
pfsdanny is currently offline  pfsdanny
Messages: 26
Registered: December 2011
Location: Hong Kong
Promising Member
#define IMAGEFILE <Image01/Image01.iml>

The first Image01 before the / is the package name, the second Image01.iml is the actual imagelist file in the Image01 package. If yu has the Image01.iml file, just copy it to your own package and insert it into your working package.

e.g. if your package name is ABC then copy the Image01.iml to your package folder and insert the Image01.iml in the IDE and use the following code
#define IMAGEFILE <ABC/Image01.iml>

Re: Hey,need help,i met a problem [message #48603 is a reply to message #48597] Tue, 08 August 2017 08:36 Go to previous message
rafiwui is currently offline  rafiwui
Messages: 105
Registered: June 2017
Location: Stuttgart, Germany
Experienced Member
And in addition:
w.DrawImage(50, 50, MyImages::MyImage());

This line needs an image called MyImage inside the defined IMAGECLASS (in this case MyImage) and the IMAGECLASS contains all the images that are designed in the IMAGEFILE.

To create such file by your own, just right click where all the files in your package are -> New package file -> select Image file (Icon) in the dropdown and name it to your needs Wink

Previous Topic: libraries not found
Next Topic: Touchscreen and buttons
Goto Forum:

Current Time: Tue Jun 25 01:58:47 CEST 2024

Total time taken to generate the page: 0.01903 seconds