Jump to content

WinQueryTaskSizePos: Difference between revisions

From EDM2
m verbiage change
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== WinQueryTaskSizePos ==
; WinQueryTaskSizePos(anchorBlockHndl, sessionId, swpStruct) :
Get the size and position of the next window to be created.
Get the size and position of the next window to be created.


=== Parameters ===
==Syntax==
; anchorBlockHndl - [[OS2 API:DataType:HAB|HAB]] - input :
WinQueryTaskSizePos(anchorBlockHndl, sessionId, swpStruct)
The anchor block handle.
; sessionId - [[OS2 API:DataType:ULONG|ULONG]] - input :
The session identifier or zero for the current session.
; swpStruct - [[OS2 API:DataType:SWP|SWP]] - output :
Window size and positioning data.


=== Constants ===
== Parameters ==
None
;anchorBlockHndl - [[HAB]] - input : The anchor block handle.
;sessionId - [[ULONG]] - input : The session identifier or zero for the current session.
;swpStruct - SWP - output : Window size and positioning data.


=== Returns ===
== Returns ==
Function returns [[OS2 API:DataType:BOOL|BOOL]] of:
Function returns [[BOOL]] of:
;[[OS2 API:Constant:TRUE|TRUE]] : Success
;[[TRUE]] : Success
;[[OS2 API:Constant:FALSE|FALSE]] : Failure
;[[FALSE]] : Failure


Possible returns from [[OS2 API:WinGetLastError|WinGetLastError]]:
Possible returns from [[WinGetLastError]]:
* [[OS2 API:PMI:error#PMERR_INVALID_PARAMETERS|PMERR_INVALID_PARAMETERS]]
* [[PM Error Codes#PMERR_INVALID_PARAMETERS|PMERR_INVALID_PARAMETERS]]
* [[OS2 API:PMI:error#PMERR_INVALID_SESSION_ID|PMERR_INVALID_SESSION_ID]]
* [[PM Error Codes#PMERR_INVALID_SESSION_ID|PMERR_INVALID_SESSION_ID]]


=== Module ===
== Define (C/C++) ==
 
=== Define (C/C++) ===
INCL_WINSWITCHLIST or INCL_PM or INCL_WIN
INCL_WINSWITCHLIST or INCL_PM or INCL_WIN


=== Export name/Ordinal ===
== Calling Convention ==
 
=== Calling conversion ===
[[Cdecl32]]
[[Cdecl32]]


=== Example Code ===
== Example Code ==
  [[OS2 API:DataType:HAB|HAB]]   anchorBlockHndl;
  HAB  anchorBlockHndl;
  [[OS2 API:DataType:ULONG|ULONG]] sessionId;
  ULONG sessionId;
  [[OS2 API:DataType:SWP|SWP]]   swpStruct;
  SWP  swpStruct;
  [[OS2 API:DataType:BOOL|BOOL]] rc;
  BOOL rc;
  ...
  ...
  rc = WinQueryTaskSizePos(anchorBlockHndl, sessionId, swpStruct);
  rc = WinQueryTaskSizePos(anchorBlockHndl, sessionId, swpStruct);
  ...
  ...


=== Related Functions ===
== Related Functions ==
[[OS2 API:WinCreateStdWindow|WinCreateStdWindow]]
*[[WinCreateStdWindow]]
[[OS2 API:WinRestoreWindowPos|WinRestoreWindowPos]]
*[[WinRestoreWindowPos]]
[[OS2 API:WinSetWindowPos|WinSetWindowPos]]
*[[WinSetWindowPos]]
[[OS2 API:WinStoreWindowPos|WinStoreWindowPos]]
*[[WinStoreWindowPos]]
 
=== Notes ===
 


=== OS Version Introduced ===
[[Category:Win]]

Latest revision as of 21:54, 6 August 2023

Get the size and position of the next window to be created.

Syntax

WinQueryTaskSizePos(anchorBlockHndl, sessionId, swpStruct)

Parameters

anchorBlockHndl - HAB - input
The anchor block handle.
sessionId - ULONG - input
The session identifier or zero for the current session.
swpStruct - SWP - output
Window size and positioning data.

Returns

Function returns BOOL of:

TRUE
Success
FALSE
Failure

Possible returns from WinGetLastError:

Define (C/C++)

INCL_WINSWITCHLIST or INCL_PM or INCL_WIN

Calling Convention

Cdecl32

Example Code

HAB   anchorBlockHndl;
ULONG sessionId;
SWP   swpStruct;
BOOL  rc;
...
rc = WinQueryTaskSizePos(anchorBlockHndl, sessionId, swpStruct);
...

Related Functions