WinOpenObject: Difference between revisions
Appearance
m corrected links |
m formatting |
||
Line 1: | Line 1: | ||
== WinOpenObject == | == WinOpenObject == | ||
; WinOpenObject(objectHandle, viewForObject, flag) : | ; WinOpenObject(objectHandle, viewForObject, flag) : Opens object with the specified view, or, if already open, surfaces it. | ||
Opens object with the specified view, or, if already open, surfaces it. | |||
=== Parameters === | === Parameters === | ||
; objectHandle - [[OS2 API:DataType:HOBJECT|HOBJECT]] - input : | ; objectHandle - [[OS2 API:DataType:HOBJECT|HOBJECT]] - input : Handle of the object to open. | ||
Handle of the object to open. | ; viewForObject - [[OS2 API:DataType:ULONG|ULONG]] - input : Specifies which view to open. An object can define its own view codes. The system defines those listed in the constants section. | ||
; viewForObject - [[OS2 API:DataType:ULONG|ULONG]] - input : | |||
Specifies which view to open. An object can define its own view codes. The system defines those listed in the constants section. | |||
; flag - [[OS2 API:DataType:BOOL|BOOL]] - input : | ; flag - [[OS2 API:DataType:BOOL|BOOL]] - input : | ||
* [[OS2 API:Constant:TRUE|TRUE]] - Opens a view of the object which already exists by calling [[OS2 API:wpViewObject|wpViewObject]], otherwise by calling [[OS2 API:wpOpen|wpOpen]]. | * [[OS2 API:Constant:TRUE|TRUE]] - Opens a view of the object which already exists by calling [[OS2 API:wpViewObject|wpViewObject]], otherwise by calling [[OS2 API:wpOpen|wpOpen]]. | ||
Line 42: | Line 39: | ||
... | ... | ||
[[OS2 API:DataType:HOBJECT|HOBJECT]] objectHandle; | [[OS2 API:DataType:HOBJECT|HOBJECT]] objectHandle; | ||
[[OS2 API:DataType:ULONG|ULONG]] viewForObject; | [[OS2 API:DataType:ULONG|ULONG]] viewForObject; | ||
[[OS2 API:DataType:BOOL|BOOL]] flag; | [[OS2 API:DataType:BOOL|BOOL]] flag; | ||
[[OS2 API:DataType:BOOL|BOOL]] rc; | [[OS2 API:DataType:BOOL|BOOL]] rc; | ||
... | ... | ||
rc = WinOpenObject (objectHandle, viewForObject, flag); | rc = WinOpenObject (objectHandle, viewForObject, flag); |
Revision as of 05:02, 1 May 2006
WinOpenObject
- WinOpenObject(objectHandle, viewForObject, flag)
- Opens object with the specified view, or, if already open, surfaces it.
Parameters
- objectHandle - HOBJECT - input
- Handle of the object to open.
- viewForObject - ULONG - input
- Specifies which view to open. An object can define its own view codes. The system defines those listed in the constants section.
- flag - BOOL - input
- TRUE - Opens a view of the object which already exists by calling wpViewObject, otherwise by calling wpOpen.
- FALSE - Opens a view of the object by calling wpOpen.
Constants
Returns
True if successful, false if not successful.
Returns from WinGetLastError should WinOpenObject fail:
Module
Define (C/C++)
INCL_WINWORKPLACE
Export name/Ordinal
Calling conversion
Example Code
... HOBJECT objectHandle; ULONG viewForObject; BOOL flag; BOOL rc; ... rc = WinOpenObject (objectHandle, viewForObject, flag); ...
Related Functions
Notes
If concurrent views are off, wpViewObject will resurface an existing object. The REXX counterpart is SysOpenObject.
OS Version Introduced
OS/2 Warp 3.0 and above, eCS 1.0 and above