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