This file contains the code for a small test application which will display 'helloworld'. Create a folder: c:\projects\helloworld\code and add the following file:
helloworld.cpp (73 lines)
/////////////////////////////////////////////////////////////////////
// Code/helloworld.cpp
// One of the EDGELIB tutorial samples for Symbian
//
// Copyright (c) 2006-2017 Elements Interactive B.V.
// http://www.edgelib.com
//
// Show "hello world" on the screen and exit by tapping the screen or
// hitting a key
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
// Include and link the library //
/////////////////////////////////////////////////////////////////////
//Include EDGELIB
#include "edgemain.h"
/////////////////////////////////////////////////////////////////////
// Class definition //
/////////////////////////////////////////////////////////////////////
//The main class
class ClassMain : public ClassEdge
{
public:
ClassMain(void);
~ClassMain(void);
ERESULT OnNextFrame(ClassEDisplay *display, unsigned long timedelta);
void OnButtonDown(unsigned long bnr, EBUTTONLIST *blist);
void OnStylusDown(POINT pnt);
};
/////////////////////////////////////////////////////////////////////
// ClassMain: public //
/////////////////////////////////////////////////////////////////////
//ClassMain: constructor
ClassMain::ClassMain(void)
{
}
//ClassMain: destructor
ClassMain::~ClassMain(void)
{
}
//Callback: Called every frame
ERESULT ClassMain::OnNextFrame(ClassEDisplay *display, unsigned long timedelta)
{
display->buffer.DrawFont(0, 0, &display->fontinternal, "Hello World!");
return(E_OK);
}
//Callback: Called when the user pressed a key or button
void ClassMain::OnButtonDown(unsigned long bnr, EBUTTONLIST *blist)
{
Quit();
}
//Callback: Called when the user points the stylus down or clicks the left mouse button
void ClassMain::OnStylusDown(POINT pnt)
{
Quit();
}
/////////////////////////////////////////////////////////////////////
// The program entry point //
/////////////////////////////////////////////////////////////////////
ClassEdge *EdgeMain(EDGESTARTUP *data){ return(new ClassMain); }- Installation
- Commandline project
- The C++ source file
- Symbian installations
- Symbian security
- Application UID