home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mega Top 1
/
os2_top1.zip
/
os2_top1
/
APPS
/
PROG
/
PASCAL
/
SPEED2
/
SAMPLES
/
PMSIMPLE
/
PMSIMPLE.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1994-10-06
|
2KB
|
139 lines
PROGRAM PmSimple;
{***************************************************************************
* *
* Speed-Pascal/2 Sample program "PMSimple" *
* *
* (C) 1993,94 Rene Nürnberger. All rights reserved. *
* *
* *
* This program is the simpliest Object-PM program possible *
* It opens a PM-window and puts out the text "Hello world". *
* *
* *
****************************************************************************}
USES PmObject,Crt; {bind Units used}
TYPE TMyApplication=OBJECT(TApplication)
CONSTRUCTOR Init;
DESTRUCTOR Done;
PROCEDURE DesktopRedraw(rc:RECTL;_hps:HPS;
Win:HWND):VIRTUAL;
END;
VAR
MyApp:TMyApplication;
{Implementation of the Methods}
CONSTRUCTOR TMyApplication.Init;
BEGIN
Inherited.Init; {Eltern aufrufen}
END;
DESTRUCTOR TMyApplication.Done;
BEGIN
END;
{This method is called by Object-PM whenever a WM_PAINT message occures}
PROCEDURE TMyApplication.DesktopRedraw(rc:RECTL;_hps:HPS;Win:HWND);
VAR pt:POINTL;
s:STRING;
BEGIN
Inherited.DesktopRedraw(rc,_hps,Win);
pt.x:=50;
pt.y:=100;
s:='Hello world';
DrawStringXY(_hps,pt,s,1,length(s),CLR_BLUE,CLR_BACKGROUND);
END;
BEGIN
MyApp.Init;
MyApp.Run(0,'PMSimple Demo Application',CLR_BLUE,CLR_WHITE);
MyApp.Done;
END.