Jump to content

WinEndPaint: Difference between revisions

From EDM2
Ak120 (talk | contribs)
m Ak120 moved page OS2 API:PMI:WinEndPaint to WinEndPaint
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This function is called when drawing in a window is complete.
This function is called when drawing in a window is complete.


=== Syntax ===
== Syntax ==
  rc = WinEndPaint( ''hps'' );
  rc = WinEndPaint( ''hps'' );


=== Parameters ===
== Parameters ==
;HPS ''hps'' (input):A handle to presentation space returned from WinBeginPaint.
;HPS ''hps'' (input):A handle to presentation space returned from WinBeginPaint.
   
   
=== Returns ===
== Returns ==
BOOL rc
;BOOL rc:A success indicator.
A success indicator.
:TRUE = Call successful.
:TRUE = Call successful.
:FALSE = An error occurred.
:FALSE = An error occurred.
=== Include Info ===
#define INCL_WINWINDOWMGR
#include <os2.h>


=== Sample Code ===
=== Sample Code ===
<pre>
<pre>
#define INCL_WINWINDOWMGR
#define INCL_WINWINDOWMGR
#include
#include <os2.h>
   .
   .
   .
   .
Line 41: Line 36:
=== See Also ===
=== See Also ===
*[[WinBeginPaint]]
*[[WinBeginPaint]]
*WinExcludeUpdateRegion, WinGetClipPS, WinGetPS, WinGetScreenPS, WinInvalidateRect, WinInvalidateRegion, WinIsWindowShowing, WinIsWindowVisible, WinLockVisRegions, WinOpenWindowDC, WinQueryUpdateRect, WinQueryUpdateRegion, WinRealizePalette, WinReleasePS, WinShowWindow, WinUpdateWindow, WinValidateRect, WinValidateRegion
*[[WinExcludeUpdateRegion]]
*[[WinGetClipPS]]
*[[WinGetPS]]
*[[WinGetScreenPS]]
*[[WinInvalidateRect]]
*[[WinInvalidateRegion]]
*[[WinIsWindowShowing]]
*[[WinIsWindowVisible]]
*[[WinLockVisRegions]]
*[[WinOpenWindowDC]]
*[[WinQueryUpdateRect]]
*[[WinQueryUpdateRegion]]
*[[WinRealizePalette]]
*[[WinReleasePS]]
*[[WinShowWindow]]
*[[WinUpdateWindow]]
*[[WinValidateRect]]
*[[WinValidateRegion]]


[[Category:Win]]
[[Category:Win]]

Latest revision as of 01:16, 9 April 2025

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

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.

Sample Code

#define INCL_WINWINDOWMGR
#include <os2.h>
   .
   .
   .
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