1 {****************************************************************************
2 
3                    Copyright (c) 1999-2000 by Florian Kl�mpfl
4 
5  ****************************************************************************}
6 
7 { Generisches OS/2-Programm  }
8 
9 program generic;
10 
11   uses
12      os2def,pmwin,bsedos;
13 
clientwndprocnull14   function clientwndproc(window : HWND;msg : longint;mp1,mp2 : MParam) :
15     MResult;export;
16 
17     var
18        ps : HPS;
19        rcl : RECTL;
20 
21     begin
22        clientwndproc:=nil;
23        case msg of
24           WM_CREATE : ;
25           WM_PAINT : ;
26           WM_COMMAND : ;
27           else clientwndproc:=WinDefWindowProc(window,msg,mp1,mp2);
28        end;
29     end;
30 
31   var
32      frame,client : HWND;
33      ab : HAB;
34      mq : HMQ;
35      msg : QMSG;
36 
37   const
38      frameflags : longint = FCF_TITLEBAR+
39                             FCF_SYSMENU+
40                     FCF_SIZEBORDER+
41                             FCF_MINBUTTON+
42                             FCF_MAXBUTTON+
43                             FCF_SHELLPOSITION+
44                             FCF_TASKLIST+
45                             FCF_MENU;
46 
47      winclass = 'GENERIC';
48      wintitle = '';
49 
50  begin
51     ab:=WinInitialize(0);
52     mq:=WinCreateMsgQueue(ab,0);
53     WinRegisterClass(ab,winclass,@clientwndproc,4,0);
54     frame:=WinCreateStdWindow(HWND(1),WS_VISIBLE,@frameflags,winclass,
55       wintitle,WS_VISIBLE,0,1,@client);
56     while (WinGetMsg(ab,@msg,0,0,0)<>0) do
57       WinDispatchMsg(ab,@msg);
58     WinDestroyWindow(frame);
59     WinDestroyMsgQueue(mq);
60     WinTerminate(ab);
61  end.
62