WinRestoreWindowPos: Difference between revisions
Appearance
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
The WinRestoreWindowPos function will restore the size and position of the window specified by ''hwnd'' to the state it was in when [[WinStoreWindowPos]] was last called with the same ''pAppName'' and ''pKeyName''. | |||
== Syntax == | |||
==Syntax== | <pre> | ||
#define INCL_WINWORKPLACE | |||
#include <os2.h> | |||
PSZ pAppName; /* Pointer to application name. */ | |||
; | PSZ pKeyName; /* Pointer to key name. */ | ||
HWND hwnd; /* Window handle of the window to restore. */ | |||
BOOL rc; /* Success indicator. */ | |||
rc = WinRestoreWindowPos(pAppName, pKeyName, | |||
hwnd); | |||
</pre> | |||
; | == Parameters == | ||
: | ;''pAppName'' ([[PSZ]]) - input: Pointer to application name. | ||
: | :A pointer to a zero-terminated string which contains the application name. | ||
; | ;''pKeyName'' ([[PSZ]]) - input: Pointer to key name. | ||
: | :A pointer to a zero-terminated string which contains the key name. | ||
: | |||
;''hwnd'' ([[HWND]]) - input: Window handle of the window to restore. | |||
== Returns == | |||
;''rc'' ([[BOOL]]) - returns: Success indicator. | |||
:TRUE: Successful completion. | |||
:FALSE: Error occurred. | |||
== Remarks == | |||
This function will also restore presentation parameters which were saved by a previous call to [[WinStoreWindowPos]]. | |||
==Example Code== | |||
Declaration: | |||
<PRE> | |||
#define INCL_WINWORKPLACE | |||
< | |||
#define | |||
#include <os2.h> | #include <os2.h> | ||
PSZ pAppName; /* Pointer to application name. */ | |||
PSZ pKeyName; /* Pointer to key name. */ | |||
PSZ | HWND hwnd; /* Window handle of the window to restore. */ | ||
BOOL rc; /* Success indicator. */ | |||
rc = | rc = WinRestoreWindowPos(pAppName, pKeyName, hwnd); | ||
</PRE> | |||
</ | |||
==Related Functions== | == Related Functions == | ||
* [[ | * [[WinStoreWindowPos]] | ||
[[Category:Win]] | [[Category:Win]] |
Latest revision as of 16:14, 15 May 2025
The WinRestoreWindowPos function will restore the size and position of the window specified by hwnd to the state it was in when WinStoreWindowPos was last called with the same pAppName and pKeyName.
Syntax
#define INCL_WINWORKPLACE #include <os2.h> PSZ pAppName; /* Pointer to application name. */ PSZ pKeyName; /* Pointer to key name. */ HWND hwnd; /* Window handle of the window to restore. */ BOOL rc; /* Success indicator. */ rc = WinRestoreWindowPos(pAppName, pKeyName, hwnd);
Parameters
- pAppName (PSZ) - input
- Pointer to application name.
- A pointer to a zero-terminated string which contains the application name.
- pKeyName (PSZ) - input
- Pointer to key name.
- A pointer to a zero-terminated string which contains the key name.
- hwnd (HWND) - input
- Window handle of the window to restore.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE: Successful completion.
- FALSE: Error occurred.
Remarks
This function will also restore presentation parameters which were saved by a previous call to WinStoreWindowPos.
Example Code
Declaration:
#define INCL_WINWORKPLACE #include <os2.h> PSZ pAppName; /* Pointer to application name. */ PSZ pKeyName; /* Pointer to key name. */ HWND hwnd; /* Window handle of the window to restore. */ BOOL rc; /* Success indicator. */ rc = WinRestoreWindowPos(pAppName, pKeyName, hwnd);