A Window Procedure
WindowProc: proc( hwndClient, msg, mp1, mp2) options( byvalue linkage( system )) returns( MRESULT );
Dcl hwndClient HWND;
Dcl msg ULONG;
Dcl ( mp1,
mp2 ) MPARAM;
Dcl ps HPS; Dcl mr MRESULT;
mr = null();
select ( msg );
when( WM_PAINT )
do;
ps = WinBeginPaint( hwndClient, null(), null());
Call WinEndPaint( ps );
end;
otherwise
mr = WinDefWindowProc( hwndClient, msg, mp1, mp2 );
end;
return( mr );
end;