home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
tv20os2.zip
/
tutorial
/
tvguid02.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1998-01-19
|
2KB
|
58 lines
/*---------------------------------------------------------*/
/* */
/* Turbo Vision 1.0 */
/* TVGUID02 Demo Source File */
/* Copyright (c) 1991 by Borland International */
/* */
/*---------------------------------------------------------*/
#define Uses_TApplication
#define Uses_TKeys
#define Uses_TRect
#define Uses_TStatusLine
#define Uses_TStatusItem
#define Uses_TStatusDef
#define Uses_TDeskTop
#include <tvision/tv.h>
// tv.h ensures that the correct *.h files are included for each
// of the above classes and their bases.
class TMyApp : public TApplication
{
public:
TMyApp();
static TStatusLine *initStatusLine( TRect r );
// new for tvguid02
};
TMyApp::TMyApp() :
TProgInit( &TMyApp::initStatusLine,
&TMyApp::initMenuBar,
&TMyApp::initDeskTop
)
{
}
// new for tvguid02:
TStatusLine *TMyApp::initStatusLine(TRect r)
{
r.a.y = r.b.y - 1; // move top to 1 line above bottom
return new TStatusLine( r,
*new TStatusDef( 0, 0xFFFF ) +
// set range of help contexts
*new TStatusItem( "~Alt-X~ Exit", kbAltX, cmQuit ) +
// define an item
*new TStatusItem( "~Alt-F3~ Close", kbAltF3, cmClose )
// and another one
);
}
int main()
{
TMyApp myApp;
myApp.run();
return 0;
}