Icons, Cursors, Strings, and Custom Resources

One of the benefits of using resources is that many components of a program can be bound into the program’s .EXE file. Without the concept of resources, a binary file such as an icon image would probably have to reside in a separate file that the .EXE would read into memory to use. Or the icon would have to be defined in the program as an array of bytes (which might make it tough to visualize the actual icon image). As a resource, the icon is stored in a separate editable file on the developer’s computer but is bound into the .EXE file during the build process.

Adding an Icon to a Program

Adding resources to a program involves using some additional features of Visual C++ Developer Studio. In the case ...

Get Programming Windows®, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.