Jump to content

WinEndPaint: Difference between revisions

From EDM2
Created page with "=== Syntax === rc = WinEndPaint( ''hps'' ); === Parameters === HPS ''hps'' (input) A handle to presentation space returned from WinBeginPaint. === Returns === BOOL rc..."
 
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=== Syntax ===
This function is called when drawing in a window is complete.


== 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.
:TRUE = Call successful.
:FALSE = An error occurred.


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 ===
=== Sample Code ===
<pre>  
<pre>
#define INCL_WINWINDOWMGR
#define INCL_WINWINDOWMGR
#include  
#include <os2.h>
 
   .
   .
   .
   .
Line 50: Line 32:
   .
   .
   .
   .
</pre>


</pre>
=== See Also ===
=== See Also ===
[[OS2 API:PMI:WinBeginPaint|PMI:WinBeginPaint]],
*[[WinBeginPaint]]
[[OS2 API:PMI:WinExcludeUpdateRegion|PMI:WinExcludeUpdateRegion]],
*[[WinExcludeUpdateRegion]]
[[OS2 API:PMI:WinGetClipPS|PMI:WinGetClipPS]],
*[[WinGetClipPS]]
[[OS2 API:PMI:WinGetPS|PMI:WinGetPS]],
*[[WinGetPS]]
[[OS2 API:PMI:WinGetScreenPS|PMI:WinGetScreenPS]],
*[[WinGetScreenPS]]
[[OS2 API:PMI:WinInvalidateRect|PMI:WinInvalidateRect]],
*[[WinInvalidateRect]]
[[OS2 API:PMI:WinInvalidateRegion|PMI:WinInvalidateRegion]],
*[[WinInvalidateRegion]]
[[OS2 API:PMI:WinIsWindowShowing|PMI:WinIsWindowShowing]],
*[[WinIsWindowShowing]]
[[OS2 API:PMI:WinIsWindowVisible|PMI:WinIsWindowVisible]],
*[[WinIsWindowVisible]]
[[OS2 API:PMI:WinLockVisRegions|PMI:WinLockVisRegions]],
*[[WinLockVisRegions]]
[[OS2 API:PMI:WinOpenWindowDC|PMI:WinOpenWindowDC]],
*[[WinOpenWindowDC]]
[[OS2 API:PMI:WinQueryUpdateRect|PMI:WinQueryUpdateRect]],
*[[WinQueryUpdateRect]]
[[OS2 API:PMI:WinQueryUpdateRegion|PMI:WinQueryUpdateRegion]],
*[[WinQueryUpdateRegion]]
[[OS2 API:PMI:WinRealizePalette|PMI:WinRealizePalette]],
*[[WinRealizePalette]]
[[OS2 API:PMI:WinReleasePS|PMI:WinReleasePS]],
*[[WinReleasePS]]
[[OS2 API:PMI:WinShowWindow|PMI:WinShowWindow]],
*[[WinShowWindow]]
[[OS2 API:PMI:WinUpdateWindow|PMI:WinUpdateWindow]],
*[[WinUpdateWindow]]
[[OS2 API:PMI:WinValidateRect|PMI:WinValidateRect]],
*[[WinValidateRect]]
[[OS2 API:PMI:WinValidateRegion|PMI:WinValidateRegion]]
*[[WinValidateRegion]]
 


[[Category:The OS/2 API Project]]
[[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