Creating and converting icons |
Icons are bitmaps that may contain transparency information. Under X, icons are usually created from XPM files, which may be loaded from a file or created from data embedded in a C++ source file.
Under Windows, icon files (extension .ico) may contain multiple icons for different sizes and colour depths, and can be loaded from a file or loaded from the Windows resources compiled into the executable.
You can decide to use only XPMs on Windows and Unix, or you could use XPMs on Unix and Windows icons under Windows -- the latter will require some #ifdefs in your code or use of the wxICON macro.
If you are using a compiler such as Borland C++, Visual C++ or Watcom C++, you can use the provided icon editor. However, if using Cygwin or Mingw32, there is no icon editor so you must obtain one separately, such as IconEdit32.
To convert from XPM to BMP (which can be loaded or pasted into an icon editor to save as an ICO file), you can use Vadim Zeitlin's xpm2bmp.exe utility. To convert from BMP to XPM, you can use bmp2xpm.exe which is actually the old wxWidgets 1.68 utility, xpmshow. You will have to edit the resulting file since the full path is used as the variable name, plus you may wish to specify a transparent colour e.g.:
" s None c None",This will indicate that the space character will be taken as the transparent colour throughout the image.