This example shows how a thread can access a presentation space, draw to it, and release it.

#define INCL_DOSSEMAPHORES
#define INCL_GPIPRIMITIVES
#define INCL_WINWINDOWMGR
#include <OS2.H>
HPS hps;


      hps = WinGetPS( hwndClient );

 /*   Draw client area              */
       .                                                                          */
       .                                                                          */
       .

 /* Release the presentation space  */

      WinReleasePS( hps );


[Back] [Next]