WpclsSetIcon: Difference between revisions
Appearance
Created page with "{{DISPLAYTITLE:wpclsSetIcon}} This class method sets the icon handle for a given object. Note: This method is available in version 3 or higher of the OS/2 operating system. ==Syntax== <pre> _wpclsSetIcon(somSelf, hptrNewIcon); </pre> ==Parameters== ;''somSelf'' (M_WPObject *) - input :Pointer to the WPObject class object. ;''hptrNewIcon'' (HPOINTER) - input :Icon handle to be set for the object. ==Returns== ;''rc'' (BOOL) - returns: Success indicator...." |
(No difference)
|
Latest revision as of 21:59, 25 May 2025
This class method sets the icon handle for a given object. Note: This method is available in version 3 or higher of the OS/2 operating system.
Syntax
_wpclsSetIcon(somSelf, hptrNewIcon);
Parameters
- somSelf (M_WPObject *) - input
- Pointer to the WPObject class object.
- hptrNewIcon (HPOINTER) - input
- Icon handle to be set for the object.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE – Successful completion.
- FALSE – An error occurred.
Remarks
- The class default icon can be loaded using wpclsInitData and freed using wpclsUnInitData.
Usage
- This method can be called at any time to set the object's default icon.
How to Override
- This method is generally not overridden.
Example Code
Declaration:
#define INCL_WINWORKPLACE #include <os2.h> M_WPObject *somSelf; /* Pointer to the WPObject class object. */ HPOINTER hptrNewIcon; /* Icon handle to be set for the object. */ BOOL rc; /* Success indicator. */ rc = _wpclsSetIcon(somSelf, hptrNewIcon);