Class XbpIcon() Foundation

Class function of the XbpIcon class.


The XbpIcon class provides objects which can display and manage graphic images defined in icon files. Icon files must be linked to the EXE file using the resource compiler in order for the icon to be loaded using the :load() method of the XbpIcon object.

Class methods
Creates an instance of the XbpIcon class.
Requests system resources for the XbpIcon object.
Reconfigures the XbpIcon object after :create() has been executed.
Releases the system resources of the XbpIcon object.
Runtime data
The number of bits per color.
Number of bit planes per pixel.
The number of pixels in x direction (width).
The number of pixels in y direction (height).
Displays an icon.
Loads an icon from a resource file linked to the executable file.
Loads an icon file from disk
Saves an icon in a file.
Returns the icon as an IPicture automation object.
Returns the icon image as an XbpBitmap object.
Initializes the icon through an IPicture automation object.
Declare, load and display an icon as a resource

// This example demonstrates the basic process of creating 
// icons and displaying them in a window. The icon is 
// loaded and displayed using the resource ID 10. At the 
// end of the example code, an example of a resource file 
// containing the icon as a resource is shown. 
   LOCAL oIcon, oPS 

   SetColor( "N/W" ) 

   oPS := SetAppWindow():presSpace() 
   oIcon:= XbpIcon():new():create() 

   oIcon:load( NIL, 10 ) 
   oIcon:draw( oPS, {50,50} ) 



/* Resource file containing the icon declaration 
   ICON     1     =  "XPPPMT.ICO" 
   POINTER  2     =  "XPPPOINT.PTR" 

   ICON     10    =  "DATABASE.ICO" 

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.