The executable for this code is downloadable at the end of the post.
Nothing spectacular mind you. Still not too bad considering the amount of work just to get OOP working properly.
class mywindow : Cwindow
{
//overridden functions.
declare OnClose(),int;
declare OnCreate(),int;
declare OnTimer(int nIDEvent),int;
}
mywindow::OnClose(),int
{
StopTimer();
Destroy();
return TRUE;
}
mywindow::OnCreate(),int
{
CenterWindow();
return TRUE;
}
mywindow::OnTimer(int nIDEvent),int
{
for(x=0;x<10;x++)
{
Line(rand(300),rand(260)+40,rand(300),rand(260)+40,RGB(rand(0xff),rand(0xff),rand(0xff)));
}
return TRUE;
}
global sub main()
{
mywindow w;
w.Create(0,0,300,300,AWS_CAPTION|AWS_VISIBLE|AWS_BORDER|AWS_SYSMENU|AWS_AUTODRAW|AWS_SIZE,0,"test window",NULL);
w.WriteText(10,10,"Aurora's first window");
w.StartTimer(10);
do {
wait();
}until w.m_hwnd = 0;
return;
}
Hey cool. Nice to see it coming along. How long do you think it will be untill we can have a go?
Lewis
A couple of hours ;)
Stuffing methods into the window class as we speak.
Paul.
Excellent, i didnt think it would be that soon. Looking forward to it.
Lewis
Still working on the release. Got a logic bug I am trying to track down regarding class methods being marked external when the shouldn't be.