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..."
 
Ak120 (talk | contribs)
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
The WinStoreWindowPos function will save the current size and position of the window specified by hwnd.


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.
    Pointer to application name.
;pKeyName (PSZ) - input:Pointer to key name.
 
:A pointer to a zero-terminated string which contains the key name.
    A pointer to a zero-terminated string which contains the application name.  
;hwnd (HWND) - input:Window handle for the window to be stored.
 
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==
==Returns==
;rc (BOOL) - returns
;rc (BOOL) - returns:Success indicator.
:Success indicator.
:;TRUE:Successful completion
:;TRUE
:;FALSE:Error occurred.
::Successful completion  
:;FALSE
::Error occurred.


==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 43: Line 30:
BOOL    rc;        /*  Success indicator. */
BOOL    rc;        /*  Success indicator. */


rc = WinStoreWindowPos(pAppName, pKeyName,
rc = WinStoreWindowPos(pAppName, pKeyName, hwnd);
      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);

Related Functions