Jump to content

WinStoreWindowPos: Difference between revisions

From EDM2
Created page with " The WinStoreWindowPos function will save the current size and position of the window specified by hwnd. ==Syntax== WinStoreWindowPos(pAppName, pKeyName, hwnd); ==Parameter..."
 
No edit summary
Line 5: Line 5:


==Parameters==
==Parameters==
pAppName (PSZ) - input
;pAppName (PSZ) - input
::Pointer to application name.
::A pointer to a zero-terminated string which contains the application name.


    Pointer to application name.
;pKeyName (PSZ) - input
 
::Pointer to key name.
    A pointer to a zero-terminated string which contains the application name.
::A pointer to a zero-terminated string which contains the key 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.  


;hwnd (HWND) - input
:Window handle for the window to be stored.


==Returns==
==Returns==

Revision as of 21:57, 6 August 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);

Related Functions