Category : OS/2 Files
Archive   : EMXTST8F.ZIP
Filename : TEST1.CC

 
Output of file : TEST1.CC contained in archive : EMXTST8F.ZIP
#include
#include


enum click {Down, Up};

class Window
{
public:
int handle;
Window();
virtual ~Window();
void Event(enum click event);
virtual void ButtonDown(void);
virtual void ButtonUp(void);
};

Window::Window()
{
printf("Window constructor called\n");
handle = 1;
}

Window::~Window()
{
printf("Window destructor called\n");
}

void Window::Event(enum click event)
{
event == Down ? ButtonDown() : ButtonUp();
}

void Window::ButtonDown(void)
{
printf("Window::ButtonDown() called\n");
}

void Window::ButtonUp(void)
{
printf("Window::ButtonUp() called\n");
}


class MyWindow : public Window
{
public:
MyWindow();
virtual ~MyWindow();
virtual void ButtonDown(void);
};

MyWindow::MyWindow()
{
printf("MyWindow constructor called\n");
handle = 2;
}

MyWindow::~MyWindow()
{
printf("MyWindow destructor called\n");
}

void MyWindow::ButtonDown(void)
{
printf("MyWindow::ButtonDown() called\n");
}


Window sWindow;
MyWindow sMyWindow;


int main(void)
{
Window Test;
MyWindow MyTest;
MyWindow *pMyTest;

printf("Main called\n");

pMyTest = new MyWindow;

Test.Event(Down);
Test.Event(Up);
MyTest.Event(Down);
MyTest.Event(Up);

delete pMyTest;

printf("Main left\n");

return 0;
}


  3 Responses to “Category : OS/2 Files
Archive   : EMXTST8F.ZIP
Filename : TEST1.CC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/