Home Hobby Work Code WWW
wmail Palm route newpic zeef Euro
Tutorial RSI Clock Convert
prevtocnextindex

Button

The application we've created in the previous section is even more boring than the one we created first. That will be fixed by putting a button in the form. That can be done in the recource file:
helloworld.rcp
#include "helloworld_rcp.h"

VERSION "2.1"
ICON "../resources/icon.bmp"
SMALLICON "../resources/icon_s.bmp"

// The main form
FORM ID MainForm AT (0 0 160 160)
NOFRAME
USABLE
BEGIN
  TITLE "Hello world"
  BUTTON "Hello" ID MainHelloButton AT (50 140 60 15) USABLE FRAME FONT 0
END

This wil create a button at position (50, 140), with a size of 60 by 15 pixels, the text Hello will be written on in with font 0.

MainHelloButton has been defined in the include file:

helloworld_rcp.h
// Defines for the Hello world application
#define MainForm         1000
#define MainHelloButton  1010

If you now run the application, you will see the Hello button on the bottom of the screen:

The application screen with the Hello world application
The application screen with the Hello world application

prevtocnextindex
Tutorial RSI Clock Convert
wmail Palm route newpic zeef Euro
Home Hobby Work Code WWW

Toni Cornelissen
13 September 2004
toni@dse.nl
Lid van de Technetium groep
Daily horoscope NetStat W3C Validator