Jump to content

wpSetObjectListFromHObjects

From EDM2
Revision as of 03:58, 25 November 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:wpSetObjectListFromHObjects}} This method is specific to version 3, or higher, of the OS/2 operating system. This instance method adds a set of objects defined by a set of HOBJECTs to the Toolbar or drawer. ==Syntax== _wpSetObjectListFromHObjects(somSelf, ulDrawer, ulNumObjects, phobjects, ulAfter) ==Parameters== ;''somSelf'' (WPLaunchPad *) - input :Pointer to the object on which the me...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This method is specific to version 3, or higher, of the OS/2 operating system.

This instance method adds a set of objects defined by a set of HOBJECTs to the Toolbar or drawer.

Syntax

_wpSetObjectListFromHObjects(somSelf,
                            ulDrawer, ulNumObjects, phobjects,
                            ulAfter)

Parameters

somSelf (WPLaunchPad *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPLaunchPad.
ulDrawer (ULONG) - input
Toolbar or drawer being set.
  • **0** Toolbar.
  • **>0** Drawer identifier.
ulNumObjects (ULONG) - input
Number of objects pointed to by *phobjects*.
phobjects (HOBJECT *) - in/out
Pointer to a list of objects to be added.
ulAfter (ULONG) - input
Number of the object after which the new objects are inserted.
  • **ADD_OBJECT_FIRST** Adds the new objects to the top of the list.
  • **ADD_OBJECT_LAST** Adds the new objects to the bottom of the list.
  • **other** Adds the new objects after the object associated with the given index. For example, to insert after the first object, set *ulAfter* to 1.

Returns

rc (BOOL) - returns
Success indicator.
  • TRUE Successful completion.
  • FALSE Error occurred.

How to Override

This method can be overridden to know when objects are being added.

Usage

This method is not covered in the provided text.

Remarks

Using HOBJECT for .INI files or files in which an application uses a rename/save/delete sequence is not supported.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

WPLaunchPad *somSelf; /* Pointer to the object on which the method is being invoked. */
ULONG ulDrawer; /* Toolbar or drawer being set. */
ULONG ulNumObjects; /* Number of objects pointed to by phobjects. */
HOBJECT *phobjects; /* Pointer to a list of objects to be added. */
ULONG ulAfter; /* Number of the object after which the new objects are inserted. */
BOOL rc; /* Success indicator. */

rc = _wpSetObjectListFromHObjects(somSelf,
           ulDrawer, ulNumObjects, phobjects,
           ulAfter);

Related Methods