home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
CMNVUE.ZIP
/
HELLO.CXX
< prev
next >
Wrap
C/C++ Source or Header
|
1988-11-30
|
981b
|
55 lines
#include "hello.hxx"
void App::far Start ()
{
HelloWind hello;
Exec ();
}
HelloWind::far HelloWind ()
{
EnableSysMenu ();
EnableBorder ();
SetCaption ( "Hello, Windows!" );
Show();
}
long HelloWind::far MenuCommand ( MenuCommandEvt mCE )
{
if ( mCE.GetItemID () == IDSABOUT )
pAboutBox -> Show ();
else
Default ( ( Event & ) mCE );
return TRUE;
}
long HelloWind::far Expose ( ExposeEvt )
{
TextPrint ( "Hello, Windows!", Point ( 10, 10 ) );
return TRUE;
}
long HelloWind::far WindowInit ( Event )
{
SysMenu tmp ( this ); // get the System Menu
tmp.AppendSeparator ();
tmp.AppendItem ( IDSABOUT, "About Hello" );
pAboutBox = new AboutDialog ( this, "ABOUTBOX" );
return TRUE;
}
long AboutDialog::far ButtonClick ( ControlEvt )
{
EndDlg ( FALSE );
return TRUE;
}
long AboutDialog::far WindowInit ( Event )
{
return TRUE;
}