home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
smapp100.zip
/
sm10.zip
/
example
/
wndproc.c
< prev
Wrap
C/C++ Source or Header
|
1997-01-26
|
931b
|
43 lines
#include "example.h"
#if defined (OS2) && defined (GUI)
MRESULT EXPENTRY ClientWndProc ( HWND hWnd, ULONG ulMsg,
MPARAM mp1, MPARAM mp2 )
/* Handle OS2 PM messages. */
{
int iC1;
HPS hPS;
switch (ulMsg)
{
case WM_TIMER:
RunBalls (&Balls);
break;
case WM_SIZE:
GetScrSize (&iScreenW, &iScreenH);
break;
case WM_PAINT:
hPS = WinBeginPaint (hWnd, 0, 0);
for (iC1 = 0;
iC1 < Balls.iNr;
iC1++)
{
PaintBall (&Balls.Ball[iC1], Balls.Ball[iC1].iColor);
}
WinEndPaint (hPS);
break;
case WM_ERASEBACKGROUND:
ClrScr ();
break;
default:
return WinDefWindowProc (hWnd, ulMsg, mp1, mp2);
}
return MRFROMLONG (FALSE);
}
#endif