]> git.saurik.com Git - wxWidgets.git/blame - docs/tech/tn0009.htm
Add wxTextEntryDialog::SetMaxLength().
[wxWidgets.git] / docs / tech / tn0009.htm
CommitLineData
f6bcfd97
BP
1<HTML>
2
3<HEAD>
4<TITLE>Creating and converting icons</TITLE>
5</HEAD>
6
7<BODY BGCOLOR=#FFFFFF TEXT=#000000 LINK=#FF0000 VLINK=#000000>
8
9<font face="Arial, Lucida Sans, Helvetica">
10
11<a name="top"></a>
12
13<table align=center width=100% border=4 cellpadding=5 cellspacing=0>
14<tr>
15<td bgcolor="#660000" align=left colspan=2>
16<font size=+1 face="Arial, Lucida Sans, Helvetica" color="#FFFFFF">
17Creating and converting icons
18</font>
19</td>
20</tr>
21</table>
22
23<P>
24
25Icons are bitmaps that may contain transparency information. Under X, icons are
26usually created from XPM files, which may be loaded from a file or created from
27data embedded in a C++ source file.<P>
28
29Under Windows, icon files (extension .ico) may contain multiple icons for different sizes and colour
30depths, and can be loaded from a file or loaded from the Windows resources compiled
31into the executable.<P>
32
33You can decide to use only XPMs on Windows and Unix, or you could use XPMs on Unix and
2edb0bde 34Windows icons under Windows -- the latter will require some #ifdefs in your code or use of the wxICON macro.<P>
f6bcfd97
BP
35
36If you are using a compiler such as Borland C++, Visual C++ or Watcom C++, you
37can use the provided icon editor. However, if using Cygwin or Mingw32, there
38is no icon editor so you must obtain one separately, such as <a href="http://hotfiles.zdnet.com/cgi-bin/texis/swlib/hotfiles/info.html?fcode=00165P">IconEdit32</a>.<P>
39
40To convert from XPM to BMP (which can be loaded or pasted into an icon editor to save as an ICO file),
f44b23b6
JS
41you can use Vadim Zeitlin's <a href="ftp://biolpc22.york.ac.uk/pub/support/xpm2bmp.exe">xpm2bmp.exe</a> utility.
42To convert from BMP to XPM, you can use <a href="ftp://biolpc22.york.ac.uk/pub/support/bmp2xpm.exe">bmp2xpm.exe</a>
fc2171bd 43which is actually the old wxWidgets 1.68 utility, xpmshow. You will have to edit the resulting
f6bcfd97
BP
44file since the full path is used as the variable name, plus you may wish to specify a transparent colour e.g.:<P>
45
46<pre>
47" s None c None",
48</pre>
49
50This will indicate that the space character will be taken as the transparent colour throughout the image.<P>
51
52<!--
53Author: JS
54Version: $Id$
55-->
56
57</font>
58
59</body>
60</html>