Enhancing your applications : Extending the parts palette : Preparing images : Preparing a resource DLL for Windows

Preparing a resource DLL for Windows
Windows icon
This section applies only to VA Smalltalk for Windows.
To prepare icons for use with VA Smalltalk for Windows, do the following:
1.
/* empty.c */
#include <windows.h>
static char appName ] = "userpal";
int FAR PASCAL LibMain (HANDLE hInstance,
WORD wDataSeg,
WORD wHeapSize,
LPSTR lpszCmdLine)
{
if (wHeapSize > 0)
UnlockData (0) ;
return 1 ;
}
2.
cl -c -AMw -Gsw -Ow -W2 -Zp empty.c
3.
LIBRARY userpal
DESCRIPTION 'Icons for user-extended palette'
EXETYPE WINDOWS
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE SINGLE
4.
link empty libentry,userpal.dll/align:16,NUL,/nod \
mdllcew libw, userpal
5.
100 ICON athltcat.ico
101 ICON runner.ico
102 ICON world.ico
6.
RC userpal.rc userpal.dll
Your icons are now ready for use with VA Smalltalk.
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:
801 BITMAP runner.bmp
You can include icons and bitmaps in the same DLL.