Using Custom Icons
- From theFile>menu, selectAdd New Item...
- SelectResourceand enter a new name. ClickOpen.
- From theEditmenu, selectAdd Resource...From the list of possible resources, selectIcon. ClickNew. The screen becomes an icon drawing tool.
- Draw the icon. (For more information about using the Graphics Editor in the integrated development environment, see theVisual C++ User's Guide.)-- or --If your icon already exists (for example, as a bitmap) and you want to import it, not draw it, select Resource from the Insert menu, then select Import from the buttons in the Resource dialog. You will be prompted for the file containing your icon.
- Display the Icon Properties dialog box by double-clicking in the icon editor area outside the icon's grid or pressing ALT+ENTER.In the ID field on the General tab of Icon Properties dialog box, replace the default icon name with either "frameicon" or "childicon." The frame window's icon must have the name "frameicon," and the child window's icon must have the name "childicon." These names must be entered with quotation marks in order to be interpreted as strings.Your icon will be saved in a file with the extension .ICO.
- Create an.RCfile to hold your icons. Select File>Save As. You will be prompted for the name of the file that will contain your icons. It must end with the extension .RC; for example, myicons.rc. Using this method, the icons and their string values will be automatically saved in the.RCfile. (Alternatively, you can create an.RCfile with any editor and add the icon names and their string values by hand.)
- Add the file to the project that contains your QuickWin application. Select Build and the.RCfile will be built into the application's executable.