Many pictures of my os are shown at:
http://picasaweb.google.com/gdxxhg/SGOS/
This is code of hello.cpp(Unicode characters are removed):
Code: Select all
#include <System.h>
using namespace System;
class Button3: public Button{
public:
Button3(BaseWindow* parent):Button( parent, string("..."), 0 ){}
virtual int OnMouseUp(int button, Point* p ){
MessageBox::Show(string("..."),
string("..."));
Button::OnMouseUp(button,p);
}
};
class Button1: public Button{
public:
Button1(BaseWindow* parent):Button( parent, string("..."), 0 ){}
virtual int OnMouseUp(int button, Point* p ){
MessageBox::Show(string("...
string("...");
Button::OnMouseUp(button,p);
}
};
class Button2: public Button{
public:
Button2(BaseWindow* parent):Button( parent, string("..."), 0 ){}
virtual int OnMouseUp(int button, Point* p ){
MessageBox::Show(string("...\n\
Mail:[email protected]"), string(".."));
Button::OnMouseUp(button,p);
}
};
class MainForm: public Form{
private:
Button3* button3;
Button1* button1;
Button2* button2;
public:
MainForm():Form( (BaseWindow*)0, string("C++ test"), 0 ){
}
virtual ~MainForm(){
Application::Exit();
}
int Init(){
Move( 100, 200, 400, 350 );
button3 = new Button3(GetClient());
button3->Move( 20, 20 );
button1 = new Button1(GetClient());
button1->Move( 20, 50 );
button2 = new Button2(GetClient());
button2->Move( 20, 80 );
}
};
extern "C" int Entry()
{
MainForm *frmMain = new MainForm();
frmMain->Init();
Application::Run(frmMain);
}