User's Guide
-
- This section applies only to VisualAge for OS/2.
To prepare icons for use with VisualAge for OS/2, do the following:
- Create an empty C source file. A file like the following will do
fine:
/* empty C file */
void empty()
{}
- Compile the empty source file to create an object file. If you are
using the IBM VisualAge for C++ compiler, the following command will
work:
icc /C+ empty.c
- Create a module definition file for the linker. This example is
named userpal.def:
LIBRARY
DESCRIPTION 'Icons for user-extended palette'
DATA NONE
- Link the object file, using your module definition file, to create an
empty DLL. Here is a command that links the files above, to create
userpal.dll:
link386 /NOD empty.obj,userpal.dll,,,userpal.def
- Create a resource script file. The following file identifies the
icons to be included in the DLL, and assigns and identifier to each
icon. Here are the contents of an example resource file, named
userpal.rc:
ICON 800 athltcat.ico
ICON 801 runner.ico
ICON 802 world.ico
- Compile your resource script file and merge the compiled resources into
your DLL with the following command:
RC userpal.rc userpal.dll
The procedure for building a resource DLL using bitmaps is the same, except
that you use lines in the .rc file that look like
this:
bitmap 801 runner.bmp
You can include icons and bitmaps in the same DLL.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]