home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
thrd1.zip
/
threads.hpp
< prev
next >
Wrap
Text File
|
1994-03-07
|
1KB
|
56 lines
#include <iapp.hpp>
#include <ithread.hpp>
#include <istattxt.hpp>
#include <iframe.hpp>
#include <imenubar.hpp>
#include <icmdhdr.hpp>
#include <iobjwin.hpp>
#include <imnitem.hpp>
#include "iuserhdr.hpp"
#include "threads.h"
class MyOtherWindow : public IFrameWindow
{
public:
MyOtherWindow( char *title, unsigned long windowId );
IStaticText myStaticText;
};
class My2ndThread : public IThread, public IUserHandler
{
public :
// Passed in IStaticText is an object on thread1 that this thread
// will write to
My2ndThread(IStaticText* static1);
~My2ndThread();
void run();
// thread 1 communicates with this thread via this IObjectWindow
IObjectWindow *myObjectWindow;
protected :
// override user virtual function from IUserHandler to read IEvents
// on the object window
Boolean user( IEvent &evt );
private:
MyOtherWindow *my2ndWindow, *my3rdWindow, *my4thWindow, *my5thWindow;
IStaticText* t1Static;
};
class MyWindow : public ICommandHandler, public IFrameWindow
{
public:
MyWindow( ) ;
~MyWindow();
protected:
Boolean command( ICommandEvent &evt );
private:
IMenuBar myMenuBar;
IStaticText myStaticText;
My2ndThread my2ndThread;
};