WinReleasePS: Difference between revisions
Appearance
mNo edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
;hps ([[HPS]]):Presentation-space handle | ;hps ([[HPS]]):Presentation-space handle | ||
==Returns== | |||
; rc (BOOL) - returns | |||
:Success indicator. | |||
:;TRUE | |||
::Successful completion. | |||
:;FALSE | |||
::Error occurred. | |||
==Remarks== | |||
Only cache presentation spaces can be released using this method, after which the presentation space is returned to the cache to be used again. The presentation-space handle should not be used following this call. | |||
==Example Code== | |||
Declaration: | |||
<pre> | |||
#define INCL_WINWINDOWMGR /* Or use INCL_WIN, INCL_PM, Also in COMMON section */ | |||
#include <os2.h> | |||
HPS hps; /* Handle of the cache presentation space to release, as returned by the WinGetPS, the WinGetScreenPS, or the WinGetClipPS function. */ | |||
BOOL rc; /* Success indicator. */ | |||
rc = WinReleasePS(hps); | |||
</pre> | |||
This example shows how a thread can access a presentation space, draw to it, and release it. | |||
<pre> | |||
#define INCL_DOSSEMAPHORES | |||
#define INCL_GPIPRIMITIVES | |||
#define INCL_WINWINDOWMGR | |||
#include <OS2.H> | |||
HPS hps; | |||
hps = WinGetPS( hwndClient ); | |||
/* Draw client area */ | |||
. */ | |||
. */ | |||
. | |||
/* Release the presentation space */ | |||
WinReleasePS( hps ); | |||
</pre> | |||
==Related Functions== | |||
* [[WinBeginPaint]] | |||
* [[WinEnableWindowUpdate]] | |||
* [[WinEndPaint]] | |||
* [[WinExcludeUpdateRegion]] | |||
* [[WinGetClipPS]] | |||
* [[WinGetPS]] | |||
* [[WinGetScreenPS]] | |||
* [[WinInvalidateRect]] | |||
* [[WinInvalidateRegion]] | |||
* [[WinIsWindowShowing]] | |||
* [[WinIsWindowVisible]] | |||
* [[WinLockVisRegions]] | |||
* [[WinOpenWindowDC]] | |||
* [[WinQueryUpdateRect]] | |||
* [[WinQueryUpdateRegion]] | |||
* [[WinRealizePalette]] | |||
* [[WinShowWindow]] | |||
* [[WinUpdateWindow]] | |||
* [[WinValidateRect]] | |||
* [[WinValidateRegion]] | |||
[[Category:Win]] | [[Category:Win]] |
Latest revision as of 18:44, 14 May 2025
This method releases a cache presentation space obtained using the WinGetPS, the WinGetScreenPS, or the WinGetClipPS call.
Syntax
WinReleasePS(hps)
Parameters
- hps (HPS)
- Presentation-space handle
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE
- Successful completion.
- FALSE
- Error occurred.
Remarks
Only cache presentation spaces can be released using this method, after which the presentation space is returned to the cache to be used again. The presentation-space handle should not be used following this call.
Example Code
Declaration:
#define INCL_WINWINDOWMGR /* Or use INCL_WIN, INCL_PM, Also in COMMON section */ #include <os2.h> HPS hps; /* Handle of the cache presentation space to release, as returned by the WinGetPS, the WinGetScreenPS, or the WinGetClipPS function. */ BOOL rc; /* Success indicator. */ rc = WinReleasePS(hps);
This example shows how a thread can access a presentation space, draw to it, and release it.
#define INCL_DOSSEMAPHORES #define INCL_GPIPRIMITIVES #define INCL_WINWINDOWMGR #include <OS2.H> HPS hps; hps = WinGetPS( hwndClient ); /* Draw client area */ . */ . */ . /* Release the presentation space */ WinReleasePS( hps );
Related Functions
- WinBeginPaint
- WinEnableWindowUpdate
- WinEndPaint
- WinExcludeUpdateRegion
- WinGetClipPS
- WinGetPS
- WinGetScreenPS
- WinInvalidateRect
- WinInvalidateRegion
- WinIsWindowShowing
- WinIsWindowVisible
- WinLockVisRegions
- WinOpenWindowDC
- WinQueryUpdateRect
- WinQueryUpdateRegion
- WinRealizePalette
- WinShowWindow
- WinUpdateWindow
- WinValidateRect
- WinValidateRegion