This function obtains a presentation space whose associated update region is set ready for drawing in a specified window.
#define INCL_WINWINDOWMGR /* Or use INCL_WIN, INCL_PM, Also in COMMON section */ #include <os2.h> HWND hwnd; /* Handle of window where drawing is going to occur. */ HPS hps; /* Presentation-space handle. */ PRECTL prclPaint; /* Bounding rectangle. */ HPS hpsPaintPS; /* Presentation-space handle. */ hpsPaintPS = WinBeginPaint(hwnd, hps, prclPaint);