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 |
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 {
public:
virtual void Paint(Draw& draw);
};
void MyApp::Paint(Draw& w)
{
w.DrawRect(GetSize(), SColorFace());
w.DrawImage(50, 50, MyImages::MyImage());
}
GUI_APP_MAIN
{
MyApp().Sizeable().Run();
}
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 #48603 is a reply to message #48597] |
Tue, 08 August 2017 08:36 |
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
Greetings
Daniel
|
|
|
Goto Forum:
Current Time: Fri Sep 20 03:58:05 CEST 2024
Total time taken to generate the page: 0.04149 seconds
|