wpSetAssociatedFileIcon
This method is specific to version 2.1, or higher, of the OS/2 operating system.
This instance method is called in order to give the data file a chance to set the icon that corresponds to its associated default view.
Syntax
wpSetAssociatedFileIcon(somSelf)
Parameters
- somSelf (WPDataFile *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPDataFile.
Returns
- There is no return value for this method.
How to Override
You should override this method if you do not want the shell to change the icon on your class of data file objects or if you want to set your own icon for your set of associations that fall outside of the range that the shell knows about. If you do override to set the icon, you should use **_wpSetIcon**.
- Additional methods overriden in class: WPDataFile**
- wpRestoreState
- wpSetDefaultView
- wpSetRealName
- wpSetType
These methods have been overriden to call **wpSetAssociatedFileIcon** on the data file if the object is initialized (except for wpRestoreState) and the icon on the data file is a default icon (OBJSTYLE_NOTDEFAULTICON is off).
- Additional methods overriden in class: WPProgramFile**
- wpSetAssociatedFileIcon** is overridden so that the program file icon that corresponds to the program and not to the associated view can be set.
Remarks
This method will not be called if the data file has a customized icon (that is, if its .ICON EA is set). This method is called when the association information about a data file has changed, such as its real name, its type, or its default view.
Example Code
#define INCL_WINWORKPLACE #include <os2.h> WPDataFile *somSelf; /* Pointer to the object on which the method is being invoked. */ wpSetAssociatedFileIcon(somSelf);