WinStoreWindowPos: Difference between revisions
Appearance
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
The WinStoreWindowPos function will save the current size and position of the window specified by hwnd. | |||
==Syntax== | ==Syntax== | ||
WinStoreWindowPos(pAppName, pKeyName, hwnd) | WinStoreWindowPos(pAppName, pKeyName, hwnd) | ||
==Parameters== | ==Parameters== | ||
;pAppName (PSZ) - input | ;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. | |||
;pKeyName (PSZ) - input | ;hwnd (HWND) - input:Window handle for the window to be stored. | ||
;hwnd (HWND) - input | |||
:Window handle for the window to be stored. | |||
==Returns== | ==Returns== | ||
;rc (BOOL) - returns | ;rc (BOOL) - returns:Success indicator. | ||
:Success indicator. | :;TRUE:Successful completion | ||
:;TRUE | :;FALSE:Error occurred. | ||
:;FALSE | |||
==Remarks== | ==Remarks== | ||
This function will also save the presentation parameters. | This function will also save the presentation parameters. | ||
==Example Code== | ==Example Code== | ||
Definition | Definition | ||
Line 37: | Line 30: | ||
BOOL rc; /* Success indicator. */ | BOOL rc; /* Success indicator. */ | ||
rc = WinStoreWindowPos(pAppName, pKeyName, | rc = WinStoreWindowPos(pAppName, pKeyName, hwnd); | ||
</pre> | </pre> | ||
Latest revision as of 14:40, 4 October 2023
The WinStoreWindowPos function will save the current size and position of the window specified by hwnd.
Syntax
WinStoreWindowPos(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 for the window to be stored.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE
- Successful completion
- FALSE
- Error occurred.
Remarks
This function will also save the presentation parameters.
Example Code
Definition
#define INCL_WINWORKPLACE #include <os2.h> PSZ pAppName; /* Pointer to application name. */ PSZ pKeyName; /* Pointer to key name. */ HWND hwnd; /* Window handle for the window to be stored. */ BOOL rc; /* Success indicator. */ rc = WinStoreWindowPos(pAppName, pKeyName, hwnd);