Jump to content

WinEndPaint

From EDM2
Revision as of 17:51, 17 May 2016 by Martini (talk | contribs) (Created page with "=== Syntax === rc = WinEndPaint( ''hps'' ); === Parameters === HPS ''hps'' (input) A handle to presentation space returned from WinBeginPaint. === Returns === BOOL rc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Syntax

rc = WinEndPaint( hps );


Parameters

HPS hps (input)

A handle to presentation space returned from WinBeginPaint.

Returns

 BOOL rc

A success indicator. TRUE = Call successful. FALSE = An error occurred.

Include Info

#define INCL_WINWINDOWMGR
#include <os2.h>


Usage Explanation

This function is called when drawing in a window is complete.


Relevant Structures

Gotchas

Sample Code

 
#define INCL_WINWINDOWMGR
#include 

   .
   .
   .
case WM_PAINT:
    hps = WinBeginPaint(hwnd, NULLHANDLE, NULL);

    WinQueryWindowRect(hwnd, &rcl);

    WinDrawText(hps, -1, "Hello World", &rcl, CLR_NEUTRAL, CLR_BACKGROUND,
                DT_CENTER | DT_VCENTER | DT_ERASERECT);

    WinEndPaint(hps);
    return 0;
   .
   .
   .

See Also

PMI:WinBeginPaint, PMI:WinExcludeUpdateRegion, PMI:WinGetClipPS, PMI:WinGetPS, PMI:WinGetScreenPS, PMI:WinInvalidateRect, PMI:WinInvalidateRegion, PMI:WinIsWindowShowing, PMI:WinIsWindowVisible, PMI:WinLockVisRegions, PMI:WinOpenWindowDC, PMI:WinQueryUpdateRect, PMI:WinQueryUpdateRegion, PMI:WinRealizePalette, PMI:WinReleasePS, PMI:WinShowWindow, PMI:WinUpdateWindow, PMI:WinValidateRect, PMI:WinValidateRegion