Jump to content

WinOpenObject: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
mNo edit summary
Line 4: Line 4:
  WinOpenObject(objectHandle, viewForObject, flag)
  WinOpenObject(objectHandle, viewForObject, flag)


=== Parameters ===
== Parameters ==
;objectHandle - [[HOBJECT]] - input : Handle of the object to open.
;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.
;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.
Line 11: Line 11:
* [[FALSE]] - Opens a view of the object by calling wpOpen.
* [[FALSE]] - Opens a view of the object by calling wpOpen.


=== Constants ===
== Constants ==
* OPEN_CONTENTS
* OPEN_CONTENTS
* OPEN_DEFAULTS
* OPEN_DEFAULTS
Line 20: Line 20:
* OPEN_TREE
* OPEN_TREE


=== Returns ===
== Returns ==
True if successful, false if not successful.
True if successful, false if not successful.
* [[TRUE]]
* [[TRUE]]
Line 28: Line 28:
* [[OS2_API:PMI:error#WPERR_INVALID_FLAGS|WPERR_INVALID_FLAGS]]
* [[OS2_API:PMI:error#WPERR_INVALID_FLAGS|WPERR_INVALID_FLAGS]]


=== Define (C/C++) ===
== Define (C/C++) ==
INCL_WINWORKPLACE
INCL_WINWORKPLACE


=== Calling Convention ===
== Calling Convention ==
[[Cdecl32]]
[[Cdecl32]]


=== Example Code ===
== Example Code ==
  ...
  ...
  HOBJECT objectHandle;
  HOBJECT objectHandle;
Line 44: Line 44:
  ...
  ...


=== Related Functions ===
== Related Functions ==
*[[WinCreateObject]]
*[[WinCreateObject]]


=== Notes ===
== Notes ==
If concurrent views are off, ''wpViewObject'' will resurface an existing object.
If concurrent views are off, ''wpViewObject'' will resurface an existing object.
The REXX counterpart is ''SysOpenObject''.
The REXX counterpart is ''SysOpenObject''.


=== OS Version Introduced ===
== OS Version Introduced ==
OS/2 Warp 3.0
OS/2 Warp 3.0


[[Category:Win]]
[[Category:Win]]

Revision as of 05:18, 20 May 2018

Opens object with the specified view, or, if already open, surfaces it.

Syntax

WinOpenObject(objectHandle, viewForObject, flag)

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

  • OPEN_CONTENTS
  • OPEN_DEFAULTS
  • OPEN_DETAILS
  • OPEN_HELP
  • OPEN_RUNNING
  • OPEN_SETTINGS
  • OPEN_TREE

Returns

True if successful, false if not successful.

Returns from WinGetLastError should WinOpenObject fail:

Define (C/C++)

INCL_WINWORKPLACE

Calling Convention

Cdecl32

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