Jump to content

wpSetIcon

From EDM2
Revision as of 18:27, 1 September 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:wpSetIcon}} This instance method is called to allow the object to set its current icon. ==Syntax== _wpSetIcon(somSelf, hptrNewIcon) ==Parameters== ;''somSelf'' (WPObject *) - input :Pointer to the object on which the method is being invoked. :Points to an object of class WPObject. ;''hptrNewIcon'' (HPOINTER) - input :Pointer to the object handle. ==Returns== ;''rc'' (BOOL) - returns :Success indicator. ::TRUE: Successful completion. ::FALSE...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This instance method is called to allow the object to set its current icon.

Syntax

_wpSetIcon(somSelf, hptrNewIcon)

Parameters

somSelf (WPObject *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPObject.
hptrNewIcon (HPOINTER) - input
Pointer to the object handle.

Returns

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

Remarks

If the OBJSTYLE_NOTDEFAULTICON style is currently set for the object, the object's icon will be destroyed if the object is destroyed or made dormant.

Usage

This method can be called at any time in order to change the visible icon for this object. To permanently change the icon, the wpSetIconData method should be called.

How to Override

This method is generally not overridden.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

WPObject      *somSelf;       /* Pointer to the object on which the method is being invoked. */
HPOINTER      hptrNewIcon;    /* Pointer to the object handle. */
BOOL          rc;             /* Success indicator. */

rc = _wpSetIcon(somSelf, hptrNewIcon);

Related Methods