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 » Community » Newbie corner » How to create and add several icons to an application
How to create and add several icons to an application [message #27043] Tue, 22 June 2010 20:35 Go to previous message
281264 is currently offline  281264
Messages: 270
Registered: June 2010
Location: Spain
Experienced Member
Hi,

I am finding some difficulties when working with the image designer and when adding icons to an application.

For instance, after creating (from scratch) a new GUI application with images a new iml file is added to my application. Well, so far so good. But when a double click on it and the image designer opens I can not create anything (it is a pity for the tool looks good).

So,

1.- How can I add several icons to an application?
2,. How can I create an icon?
3.- The example in the tutorial (attached herewith) is so telegraphic that it is hard to understand how this feature works. For example:
3.1.- the code #define IMAGECLASS TutorialImg, What is it doing?
3.2.- I reckon that ALL the images I intend to use in an application can be stored in a single file .iml???

I would appreciate if someone can shed light on this topic. Many thanks.





#include <CtrlLib/CtrlLib.h>
using namespace Upp;

#define IMAGECLASS TutorialImg
#define IMAGEFILE <Tutorial/images.iml>
#include <Draw/iml.h>

struct MyAppWindow : TopWindow {
    MenuBar menu;
    void Exit() {
        if(PromptOKCancel("Exit MyApp?"))
            Break();
    }
    void SubMenu(Bar& bar) {
        bar.Add("Exit", TutorialImg::Exit(), THISBACK(Exit));
    }
    void MainMenu(Bar& bar) {
        bar.Add("Menu", THISBACK(SubMenu));
    }
    typedef MyAppWindow CLASSNAME;
    MyAppWindow() {
        Title("My application with menu and images").Sizeable();
        AddFrame(menu);
        menu.Set(THISBACK(MainMenu));
    }
};
GUI_APP_MAIN
{
    MyAppWindow app;
    app.Run();
}



 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Compilers: Microsoft vs GCC (or MinGW)
Next Topic: Problem with the debugger
Goto Forum:
  


Current Time: Wed May 15 23:36:21 CEST 2024

Total time taken to generate the page: 0.02399 seconds