Jump to content

WinStoreWindowPos

From EDM2
Revision as of 21:57, 6 August 2023 by Martini (talk | contribs)

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);

Related Functions