win12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
WinEndPaint (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINWINDOWMGR
 
BOOL WinEndPaint(hps)
HPS hps;    /* handle of the presentation space */
 
The WinEndPaint function restores the presentation space to its state prior
to the WinBeginPaint call. If a cache presentation space was created by the
WinBeginPaint or WinGetPS function, it is released. If the text cursor was
hidden by the WinBeginPaint function, it is displayed.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hps        Identifies the presentation space. This must be the handle of the
           presentation space returned by a previous call to the
           WinBeginPaint function.
 
Return Value
 
The return value is TRUE if the function is successful or FALSE if an error
occurs.
 
Example
 
This example calls WinBeginPaint when it receives a WM_PAINT message to get
a presentation-space handle to the update region and to get the coordinates
of the update rectangle. It then fills the update rectangle and calls
WinEndPaint to release the presentation space.
 
case WM_PAINT:
    hps = WinBeginPaint(hwnd,   /* handle of the window      */
        (HPS) NULL,             /* get a cache ps            */
        &rcl);                  /* receives update rectangle */
    WinFillRect(hps, &rcl, CLR_WHITE);
    WinEndPaint(hps);
 
See Also
 
WinBeginPaint, WinFillRect, WM_PAINT