Click here to Skip to main content
14,551,019 members

Getting Started With Ultimate++

Rate this:
4.72 (42 votes)
Please Sign up or sign in to vote.
4.72 (42 votes)
6 Nov 2006
A beginner's tutorial: Using Ultimate++ to quickly create cross-platform GUI applications
In this tutorial, you will learn to make a simple shopping list which will show how easy it is to create applications with the Ultimate++ toolkit.


When it comes to creating applications, a number of solutions exist - each with advantages and disadvantages. Cross-platform toolkits have become popular due to their ease of use and portability. The purpose of this tutorial is to show how easy it is to create applications with the Ultimate++ toolkit. We will be making a simple shopping list.

What is Ultimate++?

  1. A cross-platform graphical widget toolkit for the rapid development of GUI programs.
  2. A set of C++ (and U++) libraries (called packages in Ultimate++):
    • "Core" is the base for all other Ultimate++ libraries
    • "CtrlCore" - a base for widgets (or controls)
    • "CtrlLib" - actual widgets (or controls)
    • Other libraries
  3. An IDE called TheIDE.

Ultimate++ puts the focus on the programmer, making it as easy as possible to create GUI applications.

Why Use Ultimate++?

  • It is simple, mature, and powerful.
  • It is free and open source software, released under a mostly BSD license.
  • It is being actively developed. Questions are promptly answered on the site's forums.
  • It runs (and creates applications that run) on Windows, Linux, and FreeBSD. WinCE and MacOS support is planned.
  • Code is portable from one platform to the next.
  • Many advanced features are built-in (SQL, XML, etc.).

Installing Ultimate++

Installation is very simple:

  • Download the latest version of the toolkit (Ultimate++ 605 with MinGW) from SourceForge.
  • Double click the file you just downloaded to begin installation. Leave the install path C:\upp and click install.
  • Read and accept the license agreement, then read the information about compilers. For this tutorial, we will just use the included MinGW.
  • Choose your application directory. It's fine to leave it as C:\MyApps.
  • The default settings should be sufficient. Click OK.

That's it! Wasn't that easy?

Creating a New Project

When you launch TheIDE, you will be prompted by the "Select main package" dialog. Assemblies group projects together - after you finish this tutorial, you should look through all the examples and reference applications provided. They have a wealth of information. You want to select the MyApps assembly and click the "New Package" button.

Select Main Package

Choose a name for your application. We will use SimpleDemo. Then select the template "CtrlLib application with main window".

Create New Package

Click the "Create" button at the bottom. TheIDE's main interface will now open. Two important sections exist at the top left of the screen:

IDE Files

  1. These are the Ultimate++ packages that are needed to compile your program.
  2. These are your package's files. The ones there now were created automatically.

Let's take a look at the code that was created automatically for you:


#ifndef _SimpleDemo_SimpleDemo_h
#define _SimpleDemo_SimpleDemo_h

#include <CtrlLib/CtrlLib.h>

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

class SimpleDemo : public WithSimpleDemoLayout<TopWindow> {
    typedef SimpleDemo CLASSNAME;



#include "SimpleDemo.h"

    CtrlLayout(*this, "Window title");



This is a layout file - it allows us to visually place widgets into our program. Clicking the filename opens the Layout Designer on the right.

Trying It Out

First Build Screenshot

Believe it or not, we already have a working application! It doesn't do much yet, but notice how Ultimate++ has taken care of all the tedious Windows API stuff for us. Want to try it out? Just press Ctrl-F5. (You can also click the Debug menu and select Execute). This will build the application (with debugging info) and run it.

We have a plain window with a default title. We will need to change that. We also have a close button in the corner - we probably want to add minimize and maximize buttons. Notice that the window is not resizeable.

Note: The first build is always the slowest. The Ultimate++ library must be compiled on the first run, but it is cached for later runs. TheIDE uses Blitz technology to speed up compiles on subsequent runs. (Try it! Make a trivial change-like adding a newline to main.cpp. Press Ctrl-F5 again and see how much faster it compiles.) Users have also reported that using Microsoft's Visual C++ Express compiler is faster and creates a smaller executable.

Making Our Application

We are going to make a simple shopping list application.

Setting Up the Layout

Click on the file, SimpleDemo.lay to open the layout designer. Drag the corner of the box to make our layout a bit larger. You can right-click within the layout to add new widgets.
Add a static text widget. We will use this as a heading for our application. Notice the properties that appear to the left of the layout area.

Layout Designer Properties

Set a name for the widget. It is helpful to use prefixes to distinguish what the widget is - I chose txtTitle. Set the text to "Shopping List", center the text, and set the font to 20pt. Create the following widgets:

  • Label lblItem with label "Item"
  • EditString strItem
  • Button btnAdd with label "Add"
  • ArrayCtrl arrList

Arrange the widgets so it looks like the following picture:

The Final Layout

Try compiling it again (Ctrl-F5). Our program is starting to shape up.

Making it Do Something

Let's add some functionality. We need to write a function that adds an item to our list when we push the button. Add the following to the class definition in SimpleDemo.h:

void AddItem();

Now we need to implement this. Go to main.cpp and begin typing:

void SimpleDemo::

Notice a box pops up with code suggestions. This feature is called Assist++, and it can be accessed anytime by pressing Ctrl-Space.


Write the rest of the AddItem() function:

void SimpleDemo::AddItem()
    // The ~ operator calls the object's GetData() function
    strItem <<= Null;    // Manually clear the item

Let's give the list a column title and connect the button to our new function. Add this to SimpleDemo::SimpleDemo():

 arrList.AddColumn("Item");    // Add a column titled "Item"
 arrList.Removing();        // Gives us a right-click menu to delete rows
 btnAdd <<= THISBACK(AddItem);
// Uses a callback to link the button to the function

Compile again (Ctrl-F5) to see the results.

Making It Do Just a Little More

Right now, our application does everything we need it to - simply keep up with items for a shopping list. But to show how easy certain things are in Ultimate++, let's go a little farther.
Change the window title by modifying the first line in SimpleDemo::SimpleDemo():

CtrlLayout(*this, "Shopping List");

Add the following line right after the previous line:


That adds minimize and maximize buttons to the title bar as well as allows you to resize the window.

Final Code


#ifndef _SimpleDemo_SimpleDemo_h
#define _SimpleDemo_SimpleDemo_h

#include <CtrlLib/CtrlLib.h>

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

class SimpleDemo : public WithSimpleDemoLayout<TopWindow> {
    void AddItem();
    typedef SimpleDemo CLASSNAME;



#include "SimpleDemo.h"

    CtrlLayout(*this, "Shopping List");
    arrList.AddColumn("Item");    // Add a column titled "Item"
    arrList.Removing();  // Gives us a right-click menu to delete rows
    btnAdd <<= THISBACK(AddItem);
    // Uses a callback to link the button to the function

void SimpleDemo::AddItem()
    // The ~ operator calls the object's GetData() function
    strItem <<= Null;        // Manually clear the item


Here is our application in action:

Final Product


There you have it! A very simple application made in just minutes, thanks to the power and simplicity of Ultimate++. Please note that you could then take this code over to Linux and compile it for X11. It just works. One of Ultimate++'s strengths is that it is self-contained. There is no need to find a separate IDE, a separate layout designer, or a separate compiler. It's all built-in (or bundled). I urge you to look at the example applications that are already installed to see how easy Ultimate++ is to learn.

Helpful Links


This article has no explicit license attached to it, but may contain usage terms in the article text or the download files themselves. If in doubt, please contact the author via the discussion board below. A list of licenses authors might use can be found here.


  • 6th November, 2006: Initial version


About the Author

Matt Ezell
United States United States
Matt Ezell is a student at the University of Tennessee, USA. He has been programming in C++ for a couple years, and he now uses Ultimate++ for his applications. Visit his website at Ezell Media.

Comments and Discussions

PraiseStill going strong Pin
TheRaven22-Nov-17 7:43
MemberTheRaven22-Nov-17 7:43 
QuestionU++ is well and alive Pin
Hans15-Jan-16 6:24
MemberHans15-Jan-16 6:24 
AnswerRe: U++ is well and alive Pin
TheRaven22-Nov-17 7:17
MemberTheRaven22-Nov-17 7:17 
QuestionCompile errors when tested with U++ 5485 Pin
EdwardX218-Feb-15 17:57
MemberEdwardX218-Feb-15 17:57 
QuestionWill It Compile an Existing SDK Ramdisk.H Pin
CADDex9-Nov-11 11:10
MemberCADDex9-Nov-11 11:10 
GeneralMy vote of 5 Pin
Jeffrey Scott Flesher6-Nov-11 15:03
MemberJeffrey Scott Flesher6-Nov-11 15:03 
QuestionGreat and not out of date Pin
Jeffrey Scott Flesher6-Nov-11 15:00
MemberJeffrey Scott Flesher6-Nov-11 15:00 
Nick28th10-Aug-10 4:32
MemberNick28th10-Aug-10 4:32 
GeneralThanks for article. Ultimate++ great project!!! Pin
kompotfx25-Nov-08 11:46
Memberkompotfx25-Nov-08 11:46 
Questionvb6 Adodc control Pin
Fh Kihufe2-Nov-07 5:09
MemberFh Kihufe2-Nov-07 5:09 
QuestionHow about the executable size? [modified] Pin
yosetl2-Nov-07 4:57
Memberyosetl2-Nov-07 4:57 
AnswerRe: How about the executable size? Pin
luzr10-Nov-07 3:42
Memberluzr10-Nov-07 3:42 
AnswerRe: How about the executable size? [modified] Pin
TheRaven22-Nov-17 7:21
MemberTheRaven22-Nov-17 7:21 
GeneralThis is an excellent introduction to Ultimate++ Pin
yeohhs15-Oct-06 1:18
Memberyeohhs15-Oct-06 1:18 
GeneralGreat article! Pin
5456246426424-Sep-06 14:18
Member5456246426424-Sep-06 14:18 
GeneralRe: Great article! Pin
luzr24-Sep-06 20:57
Memberluzr24-Sep-06 20:57 
GeneralRe: Great article! Pin
TheRaven22-Nov-17 7:31
MemberTheRaven22-Nov-17 7:31 
GeneralGreat job! [modified] Pin
Ronnie IJsbrandij26-Aug-06 12:23
MemberRonnie IJsbrandij26-Aug-06 12:23 
GeneralNot very conviced Pin
Emilio Garavaglia15-Aug-06 5:11
MemberEmilio Garavaglia15-Aug-06 5:11 
GeneralRe: Not very conviced Pin
luzr15-Aug-06 8:01
Memberluzr15-Aug-06 8:01 
GeneralRe: Not very conviced Pin
Emilio Garavaglia16-Aug-06 3:17
MemberEmilio Garavaglia16-Aug-06 3:17 
GeneralRe: Not very conviced Pin
luzr16-Aug-06 3:30
Memberluzr16-Aug-06 3:30 
GeneralRe: Not very conviced Pin
arilect19-Aug-06 11:19
Memberarilect19-Aug-06 11:19 
GeneralRe: Not very conviced Pin
hongdong21-Aug-06 14:44
Memberhongdong21-Aug-06 14:44 
QuestionIs it better that Smartwin++ or WTL? Pin
yarus2415-Aug-06 2:16
Memberyarus2415-Aug-06 2:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Posted 13 Aug 2006


68 bookmarked