This sample application shows how to incorporate icons in your applications, in particular, how to do the following:
Use a custom icon as the class icon
Use an icon in the About dialog box
To create the Icon application, copy and rename the source files of the Generic application, then do the following:
1.Add an ICON statement to the resource script file.
2.Add an ICON control statement to the DIALOG statement in the resource script file.
3.Load the custom icon and use it to set the class icon in the initialization function.
4.Modify the makefile to cause the Resource Compiler to add the icon to the application's executable file.
5.Compile and link the application.
This sample assumes that you have created an icon using the Image Editor, and have saved the icon in a file named MYICON.ICO.
NOTE:
Rather than typing the code provided in the following sections, you might find it more convenient to simply examine and build the sample source files provided on the sample disks.