The Resource Script File
All of the resources used by an application are defined in a resource script file. Listing 7.1 shows a simple resource script file with one single-line resource type, ICON, and one multiple-line resource type, MENU.
Code Listing 7.1. Simple Resource Script File
#include <windows.h> #include "myapp.h" // Single-line resource type MyApp ICON myapp.ico // Multiple-line resource type MyApp MENU BEGIN POPUP "&File" BEGIN MENUITEM "E&xit", IDM_EXIT END MENUITEM "&Test!", IDM_TEST POPUP "&Help" BEGIN MENUITEM "&About MyApp...", IDM_ABOUT END END |
This resource script file includes an icon file used for the application's icon and defines the menu used for the application's main menu.
There are five single-line resource script ...
Get Microsoft Windows 2000 API SuperBible 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.